Class TripleStack
java.lang.Object
|
+--TripleStack
- All Implemented Interfaces:
- java.lang.Cloneable
- public class TripleStack
- extends java.lang.Object
- implements java.lang.Cloneable
Triple stack created by parser.
Constructor Summary |
TripleStack(Table2 features)
Constructor
Needs a handle to the global features DATA structure (info) |
Method Summary |
void |
add(TripleEntry new_entry)
Adds a triple entry to the bottom of the
triple stack. |
java.lang.Object |
clone()
Clone a Triple Stack. |
void |
collapse()
Collapse the triple stack. |
void |
display()
Displays the Triple Stack. |
java.util.Vector |
getVector()
Gives a handle to the current Stack contents. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TripleStack
public TripleStack(Table2 features)
- Constructor
Needs a handle to the global features DATA structure (info)
- Parameters:
features
- info.features
clone
public java.lang.Object clone()
- Clone a Triple Stack.
- Overrides:
clone
in class java.lang.Object
add
public void add(TripleEntry new_entry)
- Adds a triple entry to the bottom of the
triple stack.
- Parameters:
new_entry
- Triple entry to add.
getVector
public java.util.Vector getVector()
- Gives a handle to the current Stack contents.
The Vector returned begins at element 0. The last element is the primary triple.
- Returns:
- Vector of TripleEntry currently contained in stack.
display
public void display()
- Displays the Triple Stack.
collapse
public void collapse()
- Collapse the triple stack.
The algorithm is to start from the primary and move down the stack, replacing triple members
whose handle matches the first element of a lower triple
The result is that all TripleEntries except those which are NP's are collpsed to size 3.