|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.parameters.validation.ReferenceConstraint
de.jstacs.parameters.validation.SimpleReferenceConstraint
public class SimpleReferenceConstraint
Class for a ReferenceConstraint that checks for "simple" conditions as defined
in the Constraint-interface.
| Field Summary |
|---|
| Fields inherited from class de.jstacs.parameters.validation.ReferenceConstraint |
|---|
constraintParameter, errorMessage |
| Fields inherited from interface de.jstacs.parameters.validation.Constraint |
|---|
EQUALS, GEQ, GT, LEQ, LT |
| Constructor Summary | |
|---|---|
SimpleReferenceConstraint(SimpleParameter constraintParameter,
int comparisonOperator)
Creates a new SimpleReferenceConstraint from a reference SimpleParameter
and a comparison operator, which is one of the values defined in the Constraint-interface. |
|
SimpleReferenceConstraint(StringBuffer representation)
Creates a new SimpleReferenceConstraint from its XML-representation. |
|
| Method Summary | |
|---|---|
boolean |
check(Object value)
Checks value for the constraint defined in the Constraint. |
SimpleReferenceConstraint |
clone()
This method returns a deep copy of the current instance. |
void |
fromXML(StringBuffer representation)
Parses a ReferenceConstraint from the XML-representation
as returned by ReferenceConstraint.toXML(). |
StringBuffer |
toXML()
This method returns an XML-representation of an instance of the implementing class. |
| Methods inherited from class de.jstacs.parameters.validation.ReferenceConstraint |
|---|
fillWithStandardFieldForClone, getErrorMessage |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleReferenceConstraint(SimpleParameter constraintParameter,
int comparisonOperator)
SimpleReferenceConstraint from a reference SimpleParameter
and a comparison operator, which is one of the values defined in the Constraint-interface.
constraintParameter - the referencecomparisonOperator - the operator
public SimpleReferenceConstraint(StringBuffer representation)
throws NonParsableException
SimpleReferenceConstraint from its XML-representation.
representation - the XML-representation
NonParsableException - is thrown if representation could not be parsed| Method Detail |
|---|
public SimpleReferenceConstraint clone()
throws CloneNotSupportedException
Constraint
clone in interface Constraintclone in class ReferenceConstraintCloneNotSupportedException - if the Constraint could not be clonedCloneablepublic boolean check(Object value)
Constraintvalue for the constraint defined in the Constraint.
Is the constraint is fulfilled, true is returned.
check in interface Constraintcheck in class ReferenceConstraintvalue - the value to be checked
public StringBuffer toXML()
Storable
toXML in interface StorabletoXML in class ReferenceConstraint
public void fromXML(StringBuffer representation)
throws NonParsableException
ReferenceConstraintReferenceConstraint from the XML-representation
as returned by ReferenceConstraint.toXML().
fromXML in class ReferenceConstraintrepresentation - the XML-representation
NonParsableException - thrown if the XML-code could not be parsed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||