| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
  |
  +--org.jutil.predicate.AbstractPredicate
        |
        +--org.jutil.predicate.CompositePredicate
A class of predicates that evaluates an object using a number of other predicates.

| Field Summary | |
| static java.lang.String | CVS_REVISION | 
| Constructor Summary | |
| CompositePredicate()Initialize a new empty CompositePredicate. | |
| CompositePredicate(Predicate[] predicates)Initialize a new CompositePredicate with the given predicates. | |
| Method Summary | |
|  void | add(Predicate predicate)Add the given predicate to the end of this CompositePredicate. | 
|  void | clear()Clear this CompositePredicate. | 
|  java.util.List | getSubPredicates()See superclass | 
|  boolean | isValidElement(java.lang.Object o)This model method is supplied to make proving the correctness of a subclass easier. | 
|  int | nbSubPredicates()See superclass | 
|  Predicate | predicateAt(int index)Return the index'th subpredicate of this CompositePredicate. | 
|  void | removeAll(Predicate predicate)Remove all occurrences of the given predicate from this CompositePredicate. | 
|  void | removedPredicateAt(int index)Remove the index'th subpredicate from this CompositePredicate. | 
| Methods inherited from class org.jutil.predicate.AbstractPredicate | 
| count, equals, exists, filter, forall | 
| Methods inherited from class java.lang.Object | 
| clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface org.jutil.predicate.Predicate | 
| eval | 
| Field Detail | 
public static final java.lang.String CVS_REVISION
| Constructor Detail | 
public CompositePredicate()
public CompositePredicate(Predicate[] predicates)
predicates - An array containing the predicates.| Method Detail | 
public boolean isValidElement(java.lang.Object o)
CollectionOperatorThis model method is supplied to make proving the correctness of a subclass easier. It offers a tunnel for information the caller of methods that operate on the collection.
Most often, this information concerns the type of the elements and them not being null.
The algorithm does not use this method, so we will not force subclasses to implement it. A strengthened specification should be given to enable proving the correctness of a specific operator.
This is actually an abstract precondition as used in Eiffel.
public void add(Predicate predicate)
predicate - The Predicate to add.public void clear()
public void removedPredicateAt(int index)
index - The index of the predicate to remove.public void removeAll(Predicate predicate)
predicate - The predicate to be removed.public Predicate predicateAt(int index)
index - The index of the requested predicate.public java.util.List getSubPredicates()
public int nbSubPredicates()
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||