org.objectweb.dream.pushwithreturn
Class KeyInteger

java.lang.Object
  extended by org.objectweb.dream.pushwithreturn.KeyInteger
All Implemented Interfaces:
Serializable, Recyclable, Key

public class KeyInteger
extends Object
implements Key, Recyclable

Implementation of the Key interface that uses positive integers.

See Also:
Serialized Form

Field Summary
protected  boolean isAll
           
protected  int key
           
protected  Reference<? extends Recyclable> recyclableReference
           
 
Constructor Summary
KeyInteger(int key, boolean isAll)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
           
 Reference<? extends Recyclable> getReference()
           
 int hashCode()
           
 boolean isAll()
          Checks whether this key correspond to all possible keys generated by the generator that made it.
 void recycle()
           
 void setReference(Reference<? extends Recyclable> recyclableReference)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isAll

protected boolean isAll

key

protected int key

recyclableReference

protected Reference<? extends Recyclable> recyclableReference
Constructor Detail

KeyInteger

public KeyInteger(int key,
                  boolean isAll)
Constructor.

Parameters:
key - the key.
isAll - boolean indicating if this is an "AllKey".
Method Detail

isAll

public boolean isAll()
Description copied from interface: Key
Checks whether this key correspond to all possible keys generated by the generator that made it.

Specified by:
isAll in interface Key
Returns:
true if this key correspond to all keys generated by the generator that made it.
See Also:
Key.isAll()

recycle

public void recycle()
Specified by:
recycle in interface Recyclable
See Also:
Recyclable.recycle()

getReference

public Reference<? extends Recyclable> getReference()
Specified by:
getReference in interface Recyclable
See Also:
Recyclable.getReference()

setReference

public void setReference(Reference<? extends Recyclable> recyclableReference)
Specified by:
setReference in interface Recyclable
See Also:
Recyclable.setReference(Reference)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()


Copyright © 2003, 2005 - INRIA Rhone-Alpes - All Rights Reserved.