Package org.apache.bval.jsr.groups
Class Group
- java.lang.Object
-
- org.apache.bval.jsr.groups.Group
-
- All Implemented Interfaces:
GroupStrategy
public final class Group extends Object implements GroupStrategy
Immutable object that wraps an interface representing a single group.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGroup.SequenceModels a group sequence.-
Nested classes/interfaces inherited from interface org.apache.bval.jsr.groups.GroupStrategy
GroupStrategy.Composite, GroupStrategy.Simple
-
-
Field Summary
Fields Modifier and Type Field Description static GroupDEFAULTthe Default Group-
Fields inherited from interface org.apache.bval.jsr.groups.GroupStrategy
EMPTY
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanapplyTo(Predicate<GroupStrategy> operation)Apply the specifiedboolean-returningoperation.booleanequals(Object o)Class<?>getGroup()Get the actual group class.Set<Group>getGroups()Get the associated groups.inthashCode()booleanisDefault()Learn whether the group represented is the default group.static Groupof(Class<?> group)GroupStrategyredefining(Map<Group,? extends GroupStrategy> redefinitions)Get an equivalent strategy making group substitutions specified byredefinitions.static Group.Sequencesequence(Collection<Group> groups)static Group.Sequencesequence(Group... groups)StringtoString()
-
-
-
Field Detail
-
DEFAULT
public static final Group DEFAULT
the Default Group
-
-
Constructor Detail
-
Group
public Group(Class<?> group)
Create a new Group instance.- Parameters:
group-
-
-
Method Detail
-
sequence
public static final Group.Sequence sequence(Group... groups)
-
sequence
public static final Group.Sequence sequence(Collection<Group> groups)
-
getGroup
public Class<?> getGroup()
Get the actual group class.- Returns:
-
isDefault
public boolean isDefault()
Learn whether the group represented is the default group.- Returns:
- boolean
-
getGroups
public Set<Group> getGroups()
Description copied from interface:GroupStrategyGet the associated groups.- Specified by:
getGroupsin interfaceGroupStrategy- Returns:
SetofGroup
-
applyTo
public boolean applyTo(Predicate<GroupStrategy> operation)
Description copied from interface:GroupStrategyApply the specifiedboolean-returningoperation.- Specified by:
applyToin interfaceGroupStrategy- Returns:
boolean
-
redefining
public GroupStrategy redefining(Map<Group,? extends GroupStrategy> redefinitions)
Description copied from interface:GroupStrategyGet an equivalent strategy making group substitutions specified byredefinitions.- Specified by:
redefiningin interfaceGroupStrategy- Returns:
GroupStrategy
-
-