public class GroupConstraint

  1. Object
  2. 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

group Constraint...
the group

Method details

isValid

public boolean isValid(Object value)
Indicates if the given value is valid or not

Parameters

value Object
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