org.drools.reteoo
Class TupleKey

java.lang.Object
  extended byorg.drools.reteoo.TupleKey
All Implemented Interfaces:
Serializable

class TupleKey
extends Object
implements Serializable

A composite key to match tuples.

Author:
bob mcwhirter
See Also:
Tuple

Field Summary
static TupleKey EMPTY_KEY
           
 
Constructor Summary
TupleKey(Declaration declaration, FactHandle handle)
           
TupleKey(TupleKey left, TupleKey right)
           
 
Method Summary
 boolean containsAll(TupleKey that)
          Determine if the specified key is a subset of this key.
 boolean containsFactHandle(FactHandle handle)
          Determine if this key contains the specified root fact object.
 boolean equals(Object thatObj)
           
 FactHandle get(Declaration declaration)
          Retrieve a FactHandle by declaration.
 Set getDeclarations()
           
 FactHandleImpl getLeastRecentFact()
           
 FactHandleImpl getMostRecentFact()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_KEY

public static final TupleKey EMPTY_KEY
Constructor Detail

TupleKey

public TupleKey(TupleKey left,
                TupleKey right)

TupleKey

public TupleKey(Declaration declaration,
                FactHandle handle)
Method Detail

toString

public String toString()

get

public FactHandle get(Declaration declaration)
Retrieve a FactHandle by declaration.

Parameters:
declaration - The declaration.
Returns:
The fact handle.

containsFactHandle

public boolean containsFactHandle(FactHandle handle)
Determine if this key contains the specified root fact object.

Parameters:
handle - The fact-handle to test.
Returns:
true if this key contains the specified root fact-handle, otherwise false.

containsAll

public boolean containsAll(TupleKey that)
Determine if the specified key is a subset of this key.

Parameters:
that - The key to compare.
Returns:
true if the specified key is a subset of this key.

getMostRecentFact

public FactHandleImpl getMostRecentFact()

getLeastRecentFact

public FactHandleImpl getLeastRecentFact()

getDeclarations

public Set getDeclarations()

equals

public boolean equals(Object thatObj)
See Also:
Object

hashCode

public int hashCode()
See Also:
Object


Copyright © 2001-2004 The Codehaus. All Rights Reserved.