|
||||||||||
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 operatorpublic SimpleReferenceConstraint(StringBuffer representation) throws NonParsableException
SimpleReferenceConstraint
from its XML-representation.
representation
- the XML-representation
NonParsableException
- is thrown if representation
could not be parsedMethod Detail |
---|
public SimpleReferenceConstraint clone() throws CloneNotSupportedException
Constraint
clone
in interface Constraint
clone
in class ReferenceConstraint
CloneNotSupportedException
- if the Constraint could not be clonedCloneable
public boolean check(Object value)
Constraint
value
for the constraint defined in the Constraint
.
Is the constraint is fulfilled, true
is returned.
check
in interface Constraint
check
in class ReferenceConstraint
value
- the value to be checked
public StringBuffer toXML()
Storable
toXML
in interface Storable
toXML
in class ReferenceConstraint
public void fromXML(StringBuffer representation) throws NonParsableException
ReferenceConstraint
ReferenceConstraint
from the XML-representation
as returned by ReferenceConstraint.toXML()
.
fromXML
in class ReferenceConstraint
representation
- 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 |