org.fopps.model
Class ConfigurationConstraint

java.lang.Object
  |
  +--org.fopps.model.AbstractItem
        |
        +--org.fopps.model.Relation
              |
              +--org.fopps.model.Constraint
                    |
                    +--org.fopps.model.ConfigurationConstraint

public class ConfigurationConstraint
extends Constraint

ConfigurationConstraint

Author:
Oliver Wieland

Field Summary
 
Fields inherited from class org.fopps.model.Relation
from, to
 
Fields inherited from class org.fopps.model.AbstractItem
ADDED_EVENT, CHANGE_EVENT, name, REMOVED_EVENT
 
Constructor Summary
ConfigurationConstraint(AbstractItem pFrom, AbstractItem pTo, ConstraintType constraintType)
           
 
Method Summary
 boolean accept(AbstractItem pItem)
          Checks, if the given objects are accepted by the relation.
 boolean check()
          Checks, if constraint is met by current configuration
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class org.fopps.model.Constraint
getConstraintType, isValid, saveUndoOnDisconnect, setConstraintType, toggleConstraintType
 
Methods inherited from class org.fopps.model.Relation
disconnect, getFrom, getTo, isGhost, loopAllowed, setAllowLoop, setFrom, setGhost, setTo
 
Methods inherited from class org.fopps.model.AbstractItem
addIncoming, addListener, addOutgoing, commitGhostRelations, containsType, copyAttributes, delete, filterElements, fireItemAdded, fireItemChanged, fireItemRemoved, getConstraints, getDescription, getIncoming, getIncomingConstraints, getListeners, getName, getOutgoing, getOutgoingConstraints, getRelationTo, hasConstraints, isBlockEvents, isConnectedWith, notifyListeners, removeAllConstraints, removeAllIncoming, removeAllListener, removeAllOutgoing, removeAllRelations, removeGhostRelations, removeIncoming, removeListener, removeOutgoing, removeRelationTo, setBlockEvents, setDescription, setIncoming, setName, setOutgoing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfigurationConstraint

public ConfigurationConstraint(AbstractItem pFrom,
                               AbstractItem pTo,
                               ConstraintType constraintType)
                        throws InvalidRelationException
Method Detail

check

public boolean check()
Checks, if constraint is met by current configuration

Specified by:
check in class Constraint
Returns:
true, if constraint is valid

accept

public boolean accept(AbstractItem pItem)
Checks, if the given objects are accepted by the relation. Subclasses may override this method to ensure consistency. ConfigurationConstraint accepts only options.

Overrides:
accept in class Relation

toString

public java.lang.String toString()
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Overrides:
toString in class Constraint
Returns:
a string representation of the object.


Fopps 0.19 - Copyright © 2002 Oliver Wieland. All Rights Reserved.