public class ExistInConstraint extends Object implements Constraint
| Constructor and Description |
|---|
ExistInConstraint(List<String> items)
Creates a new ExistIn constraint
|
ExistInConstraint(List<String> items,
boolean caseSensitive,
String errorMessage)
Creates a new ExistIn constraint
|
ExistInConstraint(List<String> items,
String errorMessage)
Creates a new ExistIn constraint
|
ExistInConstraint(String[] items)
Creates a new ExistIn constraint
|
ExistInConstraint(String[] items,
boolean caseSensitive,
String errorMessage)
Creates a new ExistIn constraint
|
ExistInConstraint(String[] items,
String errorMessage)
Creates a new ExistIn constraint
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDefaultFailMessage()
Includes the error message for the constraint
|
boolean |
isValid(Object value)
Indicates if the given value is valid or not
|
public ExistInConstraint(List<String> items, boolean caseSensitive, String errorMessage)
items - the array items the input value must exist incaseSensitive - compare the input with the items with case-sensitivity or noterrorMessage - the default error message if the constraint failspublic ExistInConstraint(String[] items, boolean caseSensitive, String errorMessage)
items - the array items the input value must exist incaseSensitive - compare the input with the items with case-sensitivity or noterrorMessage - the default error message if the constraint failspublic ExistInConstraint(List<String> items, String errorMessage)
items - the array items the input value must exist inerrorMessage - the default error message if the constraint failspublic ExistInConstraint(String[] items, String errorMessage)
items - the array items the input value must exist inerrorMessage - the default error message if the constraint failspublic ExistInConstraint(List<String> items)
items - the array items the input value must exist inpublic ExistInConstraint(String[] items)
items - the array items the input value must exist inpublic boolean isValid(Object value)
isValid in interface Constraintvalue - the value for the objectpublic String getDefaultFailMessage()
getDefaultFailMessage in interface Constraint