messif.operations
Class AbstractOperation.DataEqualOperation

java.lang.Object
  extended by messif.operations.AbstractOperation.DataEqualOperation
Enclosing class:
AbstractOperation

public static class AbstractOperation.DataEqualOperation
extends java.lang.Object

A wrapper class that allows to hash/equal abstract objects using their data and not ID. Especially, standard hashing structures (HashMap, etc.) can be used on wrapped object.


Field Summary
protected  AbstractOperation operation
          Encapsulated operation
 
Constructor Summary
AbstractOperation.DataEqualOperation(AbstractOperation operation)
          Creates a new instance of DataEqualObject wrapper over the specified LocalAbstractObject.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Indicates whether some other object has the same data as this operation.
 AbstractOperation get()
          Returns the encapsulated operation.
 int hashCode()
          Returns a hash code value for the operation data.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

operation

protected final AbstractOperation operation
Encapsulated operation

Constructor Detail

AbstractOperation.DataEqualOperation

public AbstractOperation.DataEqualOperation(AbstractOperation operation)
Creates a new instance of DataEqualObject wrapper over the specified LocalAbstractObject.

Parameters:
operation - the encapsulated object
Method Detail

get

public AbstractOperation get()
Returns the encapsulated operation.

Returns:
the encapsulated operation

hashCode

public int hashCode()
Returns a hash code value for the operation data.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for the data of this operation

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object has the same data as this operation.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object has the same data as the obj argument; false otherwise.