|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.nds.dirxml.driver.xds.Constraint
com.novell.nds.dirxml.driver.xds.EnumConstraint
An constraint that lists the possible set of java.lang.String
values for a Parameter
. By default, members are compared
case-insensitive. Values are passed to comparators as
java.lang.String
s.
e.g. ['true', 't', 'yes', 'y', '1']
Field Summary | |
static Comparator |
CASE_INSENSITIVE
Case insensitive comparator. |
static Comparator |
CASE_SENSITIVE
Case sensitive comparator. |
Constructor Summary | |
EnumConstraint()
Creates a new enumerative constraint instance. |
|
EnumConstraint(Comparator someComparator)
Creates a new enumerative constraint instance. |
Method Summary | |
void |
addLiteral(String value)
Adds a single member to this constraint. |
void |
addLiterals(String[] someValues)
Adds multiple members to this constraint. |
boolean |
canBeAppliedToMultipleParams()
Can this constraint be applied to multiple Parameters ? |
boolean |
equals(Object o)
Is the passed constraint equal to this constraint? |
boolean |
forScalar()
Can this constrait be applied to a scalar Parameter ?
|
boolean |
forStructured()
Can this constraint be applied to a structured Parameter ?
|
int |
hashCode()
Returns this constraint's hashcode. |
void |
setComparator(Comparator someComparator)
Allows customization of how members of this constraint are compared. |
void |
setNOT()
Negates this constraint. |
Methods inherited from class com.novell.nds.dirxml.driver.xds.Constraint |
getNOT, getOperator, getType, getTypes, toString |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final Comparator CASE_SENSITIVE
public static final Comparator CASE_INSENSITIVE
Constructor Detail |
public EnumConstraint()
public EnumConstraint(Comparator someComparator)
someComparator
- must not be null
Method Detail |
public void setNOT()
public void setComparator(Comparator someComparator)
CASE_INSENSITIVE
is used.
someComparator
- must not be null
public void addLiteral(String value)
value
- null
or empty string are ignoredpublic void addLiterals(String[] someValues)
someValues
- must not be null
public int hashCode()
public boolean equals(Object o)
o
- may be null
true
if they're equal; false
if they're notpublic boolean forStructured()
Constraint
Parameter
?
A structured Parameter
consists of multiple primitives or other structured Parameter
s.
forStructured
in class Constraint
true
if it can; false
if it can'tpublic boolean forScalar()
Constraint
Parameter
?
A scalar Parmeter
is a primitive (e.g., long, int, boolean) that has a single value.
forScalar
in class Constraint
true
if it can; false
if it can'tpublic boolean canBeAppliedToMultipleParams()
Constraint
Parameters
?
canBeAppliedToMultipleParams
in class Constraint
true
if it can; false
if it can't
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |