s.
- Author:
- bob mcwhirter
Constructor Summary |
(package private) |
TupleSet()
Construct. |
(package private) |
TupleSet(int initialCapacity,
float loadFactor)
Construct. |
(package private) |
TupleSet(ReteTuple tuple)
Construct with a single tuple. |
TupleSet
TupleSet()
- Construct.
TupleSet
TupleSet(int initialCapacity,
float loadFactor)
- Construct.
- Parameters:
initialCapacity
- The initial capacity of the set.loadFactor
- The load factor of the set.
TupleSet
TupleSet(ReteTuple tuple)
- Construct with a single tuple.
- Parameters:
tuple
- The tuple.
size
public int size()
- Retrieve the size (number of tuples) in this set.
- Returns:
- The size of this set.
isEmpty
public boolean isEmpty()
- Return empty status
- Returns:
- The size of this set.
addTuple
public void addTuple(ReteTuple tuple)
- Add a single
Tuple
to this set.
- Parameters:
tuple
- The tuple.
removeAllTuples
public boolean removeAllTuples(TupleKey key)
- Retract tuples from this memory.
- Parameters:
key
- The key for the tuples to be removed.
- Returns:
true
if at least one tuple was removed; false
otherwise.
getTuples
public Collection getTuples()
- Retrieve all
Tuple
s.
- Returns:
- The set of tuples.
- See Also:
Tuple
getTuple
public ReteTuple getTuple(TupleKey key)
- Retrieve a
Tuple
by TupleKey
.
- Parameters:
key
- The tuple key.
- Returns:
- The matching tuple or
null
if this set contains no
matching tuple. - See Also:
Tuple
removeTuple
public void removeTuple(TupleKey key)
- Remove a tuple from this set.
- Parameters:
key
- Key matching the tuple.
iterator
public Iterator iterator()
- Retrieve an iterator over the tuples.
- Returns:
- The iterator.
toString
public String toString()
Copyright © 2001-2004 The Codehaus. All Rights Reserved.