org.opensha.commons.param.constraint.impl
Class IntegerDiscreteConstraint
java.lang.Object
org.opensha.commons.param.constraint.AbstractParameterConstraint<Integer>
org.opensha.commons.param.constraint.impl.IntegerDiscreteConstraint
- All Implemented Interfaces:
- Serializable, Named, ParameterConstraint<Integer>
public class IntegerDiscreteConstraint
- extends AbstractParameterConstraint<Integer>
- See Also:
- Serialized Form
IntegerDiscreteConstraint
public IntegerDiscreteConstraint(ArrayList<Integer> allowed)
setAllowed
public void setAllowed(ArrayList<Integer> allowed)
isAllowed
public boolean isAllowed(Integer obj)
- Description copied from interface:
ParameterConstraint
- Determine if the new value being set is allowed.
- Parameters:
obj - Object to check if allowed via constraints.
- Returns:
- True if the value is allowed.
clone
public Object clone()
- Description copied from class:
AbstractParameterConstraint
- Returns a copy so you can't edit or damage the origial.
All concrete subclasses must implement this.
- Specified by:
clone in interface ParameterConstraint<Integer>- Specified by:
clone in class AbstractParameterConstraint<Integer>
- Returns:
- Exact copy of this object's state.
getAllowed
public ArrayList<Integer> getAllowed()
size
public int size()