org.drools.reteoo
Interface ObjectSinkList

All Known Implementing Classes:
DefaultObjectSinkList, HashedObjectSinkList

public interface ObjectSinkList

ObjectSinkList An interface for object sink lists

 

Method Summary
 boolean add(ObjectSink objectSink)
          Adds the given objectSink to the list
 boolean contains(ObjectSink objectSink)
          Returns true if the ObjectSinkList already contains the given object sink
 ObjectSink getLastObjectSink()
          Returns the last added object sink.
 java.util.List getObjectsAsList()
          Returns a list with all object sinks This may be an inneficient method to call, so we recomend using it only for tests and debug purposes Also, it returns an unmodifiable list to prevent misuse
 java.util.Iterator iterator()
          Iterates over all object Sinks
 java.util.Iterator iterator(WorkingMemory workingMemory, DefaultFactHandle handle)
          Iterates over all matching (in case of hashed list) object Sinks
 boolean remove(ObjectSink objectSink)
          Removes the given objectSink from the list
 int size()
          Returns the number of ObjectSinks in this list
 

Method Detail

contains

public boolean contains(ObjectSink objectSink)
Returns true if the ObjectSinkList already contains the given object sink

Returns:

add

public boolean add(ObjectSink objectSink)
Adds the given objectSink to the list

Parameters:
objectSink -
Returns:

remove

public boolean remove(ObjectSink objectSink)
Removes the given objectSink from the list

Parameters:
objectSink -
Returns:

size

public int size()
Returns the number of ObjectSinks in this list

Returns:

getLastObjectSink

public ObjectSink getLastObjectSink()
Returns the last added object sink.

Returns:

iterator

public java.util.Iterator iterator(WorkingMemory workingMemory,
                                   DefaultFactHandle handle)
Iterates over all matching (in case of hashed list) object Sinks

Parameters:
workingMemory -
handle -
Returns:

iterator

public java.util.Iterator iterator()
Iterates over all object Sinks

Returns:

getObjectsAsList

public java.util.List getObjectsAsList()
Returns a list with all object sinks This may be an inneficient method to call, so we recomend using it only for tests and debug purposes Also, it returns an unmodifiable list to prevent misuse

Returns: