org.jutil.predicate
Class Equal

java.lang.Object
  |
  +--org.jutil.predicate.AbstractPredicate
        |
        +--org.jutil.predicate.TotalPredicate
              |
              +--org.jutil.predicate.PrimitiveTotalPredicate
                    |
                    +--org.jutil.predicate.Equal
All Implemented Interfaces:
CollectionOperator, Predicate

public class Equal
extends PrimitiveTotalPredicate

A class of predicate that check whether or not the given argument equals getObject().


Field Summary
static java.lang.String CVS_REVISION
           
 
Constructor Summary
Equal(java.lang.Object object)
          Initialize a new Equal with the given object
 
Method Summary
 boolean eval(java.lang.Object object)
          Evaluate this Predicate for the given object.
 java.lang.Object getObject()
          Return the object of this Equal.
 
Methods inherited from class org.jutil.predicate.PrimitiveTotalPredicate
getSubPredicates, nbSubPredicates
 
Methods inherited from class org.jutil.predicate.TotalPredicate
count, exists, filter, forall, isValidElement
 
Methods inherited from class org.jutil.predicate.AbstractPredicate
equals
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CVS_REVISION

public static final java.lang.String CVS_REVISION
Constructor Detail

Equal

public Equal(java.lang.Object object)

Initialize a new Equal with the given object

Parameters:
object - The object that will be used for the equality check.

Specifications:
public behavior
requires object != null;
ensures getObject() == object;
Method Detail

getObject

public java.lang.Object getObject()
Return the object of this Equal.

Specifications:
public behavior
ensures \result != null;

eval

public boolean eval(java.lang.Object object)
Description copied from interface: Predicate
Evaluate this Predicate for the given object.

Specifications:
     also
public behavior
ensures \result == getObject().equals(object);

Specifications inherited from overridden method in class TotalPredicate:
     also
public behavior
signals (Exception) false;
Specifications inherited from overridden method in interface Predicate:
public behavior
ensures \result == true|\result == false;
signals (Exception) !isValidElement(object);