public class GroupConstraint
- Object
- GroupConstraint
ImplementsConstraint
Groups several constraints as if they are one constraint
Constructors
public GroupConstraint(Constraint... group) | Create a new constraint group |
Methods
public boolean isValid(Object value) | Indicates if the given value is valid or not |
public String getDefaultFailMessage() | Includes the error message for the constraint |
Inherited methods
Constructor details
GroupConstraint
public GroupConstraint(Constraint... group)Create a new constraint group
Parameters
groupConstraint...- the group
Method details
isValid
public boolean isValid(Object value)Indicates if the given value is valid or not
Parameters
valueObject- the value for the object
Returns
true if the value is valid and false otherwise
getDefaultFailMessage
public String getDefaultFailMessage()Includes the error message for the constraint
Returns
the text of the error message for a constraint