org.jutil.predicate
Class Identical
java.lang.Object
|
+--org.jutil.predicate.AbstractPredicate
|
+--org.jutil.predicate.TotalPredicate
|
+--org.jutil.predicate.PrimitiveTotalPredicate
|
+--org.jutil.predicate.Identical
- All Implemented Interfaces:
- CollectionOperator, Predicate
- public class Identical
- extends PrimitiveTotalPredicate
A class of predicate that check whether or not the given argument
is the same as some object.
|
Constructor Summary |
Identical(java.lang.Object object)
Initialize a new Identical 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 Identical. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CVS_REVISION
public static final java.lang.String CVS_REVISION
Identical
public Identical(java.lang.Object object)
Initialize a new Identical with the given object
- Parameters:
object - The object that will be used for the identity check.
- Specifications:
-
public behavior
ensures getObject() == object;
getObject
public java.lang.Object getObject()
- Return the object of this Identical.
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() == 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);