站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 4.0.0.11754MR2 API 英文版文档

ReteTuple (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.drools.reteoo
Class ReteTuple

java.lang.Object
  extended by org.drools.reteoo.ReteTuple
All Implemented Interfaces:
Serializable, Tuple, Entry

public class ReteTuple
extends Object
implements Tuple, Entry

See Also:
Serialized Form

Constructor Summary
ReteTuple(InternalFactHandle handle)
           
ReteTuple(ReteTuple tuple)
           
ReteTuple(ReteTuple parentTuple, InternalFactHandle handle)
           
 
Method Summary
 boolean equals(Object object)
           
 boolean equals(ReteTuple other)
          We use this equals method to avoid the cast
 InternalFactHandle get(Declaration declaration)
          Returns the FactHandle for the given Declaration, which in turn specifcy the Pattern that they depend on.
 InternalFactHandle get(int index)
          Returns the FactHandle for the given pattern index.
 Activation getActivation()
           
 InternalFactHandle[] getFactHandles()
          Returns the fact handles in reverse order
 InternalFactHandle getLastHandle()
           
 int getMatches()
           
 Entry getNext()
           
 long getRecency()
          Returns the tuple recency
 ReteTuple getSubTuple(int elements)
          Returns the ReteTuple that contains the "elements" first elements in this tuple.
 int hashCode()
           
 boolean isFieldIndexed()
           
 void setActivation(Activation activation)
           
 void setIsFieldIndexHashCode(boolean fieldIndexed)
           
 void setMatches(int matches)
           
 void setNext(Entry next)
           
 int size()
          Returns the size of this tuple in number of elements (patterns)
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReteTuple

public ReteTuple(InternalFactHandle handle)

ReteTuple

public ReteTuple(ReteTuple tuple)

ReteTuple

public ReteTuple(ReteTuple parentTuple,
                 InternalFactHandle handle)
Method Detail

get

public InternalFactHandle get(int index)
Description copied from interface: Tuple
Returns the FactHandle for the given pattern index. If the pattern is empty It returns null.

Specified by:
get in interface Tuple
Parameters:
index - The index of the pattern from which the FactHandleImpl is to be returned
Returns:
The FactHandle

setNext

public void setNext(Entry next)
Specified by:
setNext in interface Entry

getNext

public Entry getNext()
Specified by:
getNext in interface Entry

isFieldIndexed

public boolean isFieldIndexed()

setIsFieldIndexHashCode

public void setIsFieldIndexHashCode(boolean fieldIndexed)

getMatches

public int getMatches()

setMatches

public void setMatches(int matches)

getLastHandle

public InternalFactHandle getLastHandle()

get

public InternalFactHandle get(Declaration declaration)
Description copied from interface: Tuple
Returns the FactHandle for the given Declaration, which in turn specifcy the Pattern that they depend on.

Specified by:
get in interface Tuple
Parameters:
declaration - The Declaration which specifies the Pattern
Returns:
The FactHandle

getActivation

public Activation getActivation()

getFactHandles

public InternalFactHandle[] getFactHandles()
Returns the fact handles in reverse order

Specified by:
getFactHandles in interface Tuple

getRecency

public long getRecency()
Description copied from interface: Tuple
Returns the tuple recency

Specified by:
getRecency in interface Tuple
Returns:

setActivation

public void setActivation(Activation activation)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(ReteTuple other)
We use this equals method to avoid the cast

Parameters:
tuple -
Returns:

equals

public boolean equals(Object object)
Overrides:
equals in class Object

size

public int size()
Description copied from interface: Tuple
Returns the size of this tuple in number of elements (patterns)

Specified by:
size in interface Tuple
Returns:

getSubTuple

public ReteTuple getSubTuple(int elements)
Returns the ReteTuple that contains the "elements" first elements in this tuple. Use carefully as no cloning is made during this process. This method is used by TupleStartEqualsConstraint when joining a subnetwork tuple into the main network tuple;

Parameters:
elements - the number of elements to return, starting from the begining of the tuple
Returns:
a ReteTuple containing the "elements" first elements of this tuple or null if "elements" is greater than size;


Copyright © 2001-2007 JBoss Inc.. All Rights Reserved.