|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.biojava.bio.CollectionConstraint.AllValuesIn
CollectionConstraint which validates all members of a Collection.
All members must be vaild according to the supplied
PropertyConstraint, and the total number of
members must be acceptable by the given cardinality constraint.
| Nested Class Summary |
| Nested classes inherited from class org.biojava.bio.CollectionConstraint |
CollectionConstraint.AllValuesIn, CollectionConstraint.And, CollectionConstraint.Contains, CollectionConstraint.Or |
| Field Summary |
| Fields inherited from interface org.biojava.bio.CollectionConstraint |
ANY, EMPTY, NONE |
| Constructor Summary | |
CollectionConstraint.AllValuesIn(PropertyConstraint pc,
Location card)
|
|
| Method Summary | |
boolean |
accept(java.lang.Object o)
accept returns true if the value fulfills the
constraint. |
boolean |
equals(java.lang.Object o)
|
Location |
getCardinalityConstraint()
|
PropertyConstraint |
getPropertyConstraint()
|
int |
hashCode()
|
boolean |
subConstraintOf(CollectionConstraint cc)
subConstraintOf returns true if the constraint
is a sub-constraint. |
java.lang.String |
toString()
|
boolean |
validateAddValue(java.util.Collection oldcol,
java.lang.Object newValue)
Return true iff the Collection formed by adding
newValue to current would be accepted
by this constraint. |
boolean |
validateRemoveValue(java.util.Collection oldcol,
java.lang.Object victim)
Return true iff the Collection formed by removing
newValue from current would be accepted
by this constraint. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public CollectionConstraint.AllValuesIn(PropertyConstraint pc,
Location card)
| Method Detail |
public PropertyConstraint getPropertyConstraint()
public Location getCardinalityConstraint()
public boolean accept(java.lang.Object o)
CollectionConstraintaccept returns true if the value fulfills the
constraint.
accept in interface CollectionConstraint
public boolean validateAddValue(java.util.Collection oldcol,
java.lang.Object newValue)
CollectionConstrainttrue iff the Collection formed by adding
newValue to current would be accepted
by this constraint.
validateAddValue in interface CollectionConstraint
public boolean validateRemoveValue(java.util.Collection oldcol,
java.lang.Object victim)
CollectionConstrainttrue iff the Collection formed by removing
newValue from current would be accepted
by this constraint.
validateRemoveValue in interface CollectionConstraintpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic boolean subConstraintOf(CollectionConstraint cc)
CollectionConstraintsubConstraintOf returns true if the constraint
is a sub-constraint.
A pair of constraints super and sub are in a superConstraint/subConstraint relationship if every object accepted by sub is also accepted by super. To put it another way, if instanceOf was used as a set-membership indicator function over some set of objects, then the set produced by super would be a superset of that produced by sub.
It is not expected that constraints will neccesarily
maintain references to super/sub types. It will be more usual
to infer this relationship by introspecting the constraints
themselves. For example,
CollectionConstraint.ByClass will infer
subConstraintOf by looking at the possible class of all items
matching subConstraint.
subConstraintOf in interface CollectionConstraintcc - a CollectionConstraint to check.
boolean.public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||