org.springframework.rules.constraint
Class InGroup
java.lang.Object
org.springframework.rules.constraint.InGroup
- All Implemented Interfaces:
- Constraint
public class InGroup
- extends Object
- implements Constraint
A constraint that tests if an argument is one of a group. Similiar to a database's 'in' operator, and more convenient
than using a bunch of ORs.
- Author:
- Keith Donald
InGroup
public InGroup(Set group)
InGroup
public InGroup(Object[] group)
iterator
public Iterator iterator()
- returns an iterator of the group elements
- Returns:
- iterator containing the elements of the group.
test
public boolean test(Object value)
- Tests the variable argument value is in this group.
- Specified by:
test
in interface Constraint
- Parameters:
value
- the argument value
- Returns:
true
if the condition was satisfied,
false
otherwise- See Also:
Constraint.test(java.lang.Object)
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2004-2008 The Spring Framework. All Rights Reserved.