|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.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 interface Constraint
.
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)
The standard constructor for the interface Storable . |
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 as StringBuffer 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 reference SimpleParameter
comparisonOperator
- the comparison operatorpublic SimpleReferenceConstraint(StringBuffer representation) throws NonParsableException
Storable
.
Creates a new SimpleReferenceConstraint
from its XML
representation.
representation
- the XML representation as StringBuffer
NonParsableException
- 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
. If the constraint is fulfilled, true
is
returned.
check
in interface Constraint
check
in class ReferenceConstraint
value
- the Object
to be checked
true
if the constraint is fulfilled,
false
otherwisepublic StringBuffer toXML()
Storable
StringBuffer
of an
instance of the implementing class.
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
- if the XML code could not be parsed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |