|
||||||||||
| 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 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 SimpleParametercomparisonOperator - the comparison operator
public 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 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. If the constraint is fulfilled, true is
returned.
check in interface Constraintcheck in class ReferenceConstraintvalue - the Object to be checked
true if the constraint is fulfilled,
false otherwisepublic StringBuffer toXML()
StorableStringBuffer of an
instance of the implementing class.
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 - if the XML code could not be parsed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||