org.drools.core.util
Class RightTupleList

java.lang.Object
  extended by org.drools.core.util.RightTupleList
All Implemented Interfaces:
Entry, RightTupleMemory

public class RightTupleList
extends Object
implements RightTupleMemory, Entry


Nested Class Summary
static class RightTupleList.TupleHashTableIterator
           
 
Field Summary
 RightTuple first
           
 RightTuple last
           
 Entry next
           
 Entry previous
           
 
Constructor Summary
RightTupleList()
           
RightTupleList(AbstractHashTable.Index index, int hashCode)
           
RightTupleList(AbstractHashTable.Index index, int hashCode, Entry next)
           
RightTupleList(RightTupleList p, Entry next)
           
 
Method Summary
 void add(RightTuple rightTuple)
           
 boolean contains(InternalFactHandle handle)
           
 boolean contains(RightTuple rightTuple)
           
 boolean equals(Object object)
           
 FastIterator fastIterator()
           
 FastIterator fullFastIterator()
           
 RightTuple get(InternalFactHandle handle)
           
 RightTuple get(RightTuple rightTuple)
           
 RightTuple getFirst()
           
 RightTuple getFirst(LeftTuple leftTuple, InternalFactHandle factHandle)
          The FactHandle is always the context fact and is necessary when the object being modified is in the both left and right node memories.
 AbstractHashTable.Index getIndex()
           
 RightTuple getLast()
           
 Entry getNext()
           
 int hashCode()
           
 boolean isIndexed()
           
 Iterator iterator()
           
 boolean matches(LeftTuple tuple, int tupleHashCode, InternalFactHandle factHandle)
           
 boolean matches(Object object, int objectHashCode)
           
 void remove(RightTuple rightTuple)
          We assume that this rightTuple is contained in this hash table
 void removeAdd(RightTuple rightTuple)
           
 void setNext(Entry next)
           
 int size()
           
 RightTuple[] toArray()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

previous

public Entry previous

next

public Entry next

first

public RightTuple first

last

public RightTuple last
Constructor Detail

RightTupleList

public RightTupleList()

RightTupleList

public RightTupleList(AbstractHashTable.Index index,
                      int hashCode)

RightTupleList

public RightTupleList(AbstractHashTable.Index index,
                      int hashCode,
                      Entry next)

RightTupleList

public RightTupleList(RightTupleList p,
                      Entry next)
Method Detail

getFirst

public RightTuple getFirst(LeftTuple leftTuple,
                           InternalFactHandle factHandle)
Description copied from interface: RightTupleMemory
The FactHandle is always the context fact and is necessary when the object being modified is in the both left and right node memories. This is because the memory on the opposite side would not have yet memory.removeAdd the fact, so it could potentially be in the wrong bucket. So the bucket matches check always checks to ignore the first facthandle if it's the same as the context fact.

Specified by:
getFirst in interface RightTupleMemory
Returns:

getFirst

public RightTuple getFirst()

getLast

public RightTuple getLast()

removeAdd

public void removeAdd(RightTuple rightTuple)
Specified by:
removeAdd in interface RightTupleMemory

add

public void add(RightTuple rightTuple)
Specified by:
add in interface RightTupleMemory

remove

public void remove(RightTuple rightTuple)
We assume that this rightTuple is contained in this hash table

Specified by:
remove in interface RightTupleMemory

get

public RightTuple get(InternalFactHandle handle)

contains

public boolean contains(InternalFactHandle handle)

get

public RightTuple get(RightTuple rightTuple)

contains

public boolean contains(RightTuple rightTuple)
Specified by:
contains in interface RightTupleMemory

size

public int size()
Specified by:
size in interface RightTupleMemory

fastIterator

public FastIterator fastIterator()
Specified by:
fastIterator in interface RightTupleMemory

fullFastIterator

public FastIterator fullFastIterator()
Specified by:
fullFastIterator in interface RightTupleMemory

iterator

public Iterator iterator()
Specified by:
iterator in interface RightTupleMemory

matches

public boolean matches(Object object,
                       int objectHashCode)

matches

public boolean matches(LeftTuple tuple,
                       int tupleHashCode,
                       InternalFactHandle factHandle)

toArray

public RightTuple[] toArray()
Specified by:
toArray in interface RightTupleMemory

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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

getNext

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

setNext

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

isIndexed

public boolean isIndexed()
Specified by:
isIndexed in interface RightTupleMemory

getIndex

public AbstractHashTable.Index getIndex()

toString

public String toString()
Overrides:
toString in class Object


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