org.gcube.data.trees.constraints
Class All<T>
java.lang.Object
org.gcube.data.trees.constraints.BaseConstraint<T>
org.gcube.data.trees.constraints.All<T>
- Type Parameters:
T - the type of the constrained values.
- All Implemented Interfaces:
- Serializable, Constraint<T>
public class All<T>
- extends BaseConstraint<T>
Accepts values that have the same type and satisfy one ore more constraints.
- Author:
- Fabio Simeoni
- See Also:
- Serialized Form
All
public All(Constraint<T> c1,
Constraint<T> c2)
- Creates an instance from two constraints.
- Parameters:
c1 - the first constraintc2 - the second constraint
constraints
public List<Constraint<T>> constraints()
accepts
public boolean accepts(T t)
- Description copied from interface:
Constraint
- Returns
true if a value satisfies the constraint.
- Parameters:
t - the value.
- Returns:
true if the value satisfies the constraint, false if it does not.
toString
public String toString()
-
- Overrides:
toString in class BaseConstraint<T>
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
Copyright © 2012. All Rights Reserved.