|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectviper.api.datatypes.InstanceOfConstraint
A simple param for Attributes that constrains the value to instances of a given class or interface. It defaults to java.lang.Object, meaning that it allows any java object as a value.
| Constructor Summary | |
InstanceOfConstraint()
Constructs a new constraint that accepts any class that is a child of Object. |
|
InstanceOfConstraint(java.lang.Class constraint)
Creates a new InstanceOfConstraint with the given class as the constraint. |
|
| Method Summary | |
boolean |
equals(java.lang.Object o)
Tests to see if the specified object contains the same constraint. |
java.lang.Object |
getObjectValue(java.lang.Object o)
Returns the specified object, as it is assumed to be of the same type. |
int |
hashCode()
Gets a hash code for the type. |
java.lang.Object |
setAttributeValue(java.lang.Object o)
Converts the object from external/unencoded form into internal/encoded form, while checking to make sure it is valid. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public InstanceOfConstraint(java.lang.Class constraint)
constraint - the class that any value must be an instance ofpublic InstanceOfConstraint()
| Method Detail |
public java.lang.Object getObjectValue(java.lang.Object o)
getObjectValue in interface AttrValueWrappero -
AttrValueWrapper.getObjectValue(Object)public java.lang.Object setAttributeValue(java.lang.Object o)
AttrValueWrapper
setAttributeValue in interface AttrValueWrappero - the new value to set
AttrValueWrapper.setAttributeValue(Object)public boolean equals(java.lang.Object o)
o - the object to compare with
true if o constrians the types
to the same class as this onepublic int hashCode()
constraint.hashCode()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||