|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.utilities.optionhandling.constraints.EqualStringConstraint
public class EqualStringConstraint
Represents a parameter constraint for testing if the string value of the
string parameter (
StringParameter
) to be tested is equal to the specified constraint-strings.
Field Summary | |
---|---|
private String[] |
testStrings
Constraint-strings. |
Constructor Summary | |
---|---|
EqualStringConstraint(String[] testStrings)
Creates an Equal-To-String parameter constraint. |
Method Summary | |
---|---|
private String |
constraintStrings()
|
String |
getDescription(String parameterName)
Returns a description of this constraint. |
void |
test(String t)
Checks if the given string value of the string parameter is equal to one of the constraint strings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private String[] testStrings
Constructor Detail |
---|
public EqualStringConstraint(String[] testStrings)
That is, the string value of the parameter to be tested has to be equal to one of the given constraint-strings.
testStrings
- constraint-strings.Method Detail |
---|
private String constraintStrings()
public void test(String t) throws ParameterException
test
in interface ParameterConstraint<String>
t
- Value to be checked whether or not it fulfills the underlying
parameter constraint.
ParameterException
- if the parameter to be tested does not
fulfill the parameter constraintpublic String getDescription(String parameterName)
ParameterConstraint
getDescription
in interface ParameterConstraint<String>
parameterName
- the name of the parameter this constraint is used for
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |