|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectLBJ2.parse.LinkedChild
LBJ2.parse.LinkedVector
public class LinkedVector
A LinkedVector is used to store a vector of
LinkedChildren which all maintain links between each other
and the parent LinkedVector.
LinkedChild,
Serialized Form| Field Summary | |
|---|---|
protected java.util.Vector |
children
The linked vector is simply represented as a vector of children. |
| Fields inherited from class LBJ2.parse.LinkedChild |
|---|
end, next, parent, previous, start |
| Constructor Summary | |
|---|---|
LinkedVector()
Initializes the vector. |
|
LinkedVector(int s,
int e)
Constructor that sets the character offsets of this vector. |
|
LinkedVector(LinkedChild c)
Constructor for when only a single child from anywhere in this vector is available. |
|
LinkedVector(LinkedChild c,
int s,
int e)
Constructor for when only a single child from anywhere in this vector is available. |
|
LinkedVector(LinkedVector p)
Useful when the information that this child represents is parsed forwards. |
|
LinkedVector(LinkedVector p,
int s,
int e)
Useful when the information that this child represents is parsed forwards. |
|
| Method Summary | |
|---|---|
boolean |
add(LinkedChild c)
Adds the specified child to the end of the vector, informing the child of its parent and index and linking the child to its only neighbor (which was previously the last child in the vector). |
java.lang.Object |
clone()
Returns a clone of this object that is deep in the sense that all of the children objects are cloned. |
LinkedChild |
get(int i)
Retrieves the child at the specified index in the vector. |
boolean |
insert(LinkedChild c,
int i)
Inserts the specified child into the specified index. |
LinkedChild |
remove(int i)
Removes the child at the specified index. |
int |
size()
Returns the size of the vector. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Vector children
| Constructor Detail |
|---|
public LinkedVector()
public LinkedVector(LinkedChild c)
previous and
next links are filled in by every child.
c - Any child in this vector.public LinkedVector(LinkedVector p)
p - The previous child in the parent vector.
public LinkedVector(int s,
int e)
s - The offset at which this sentence starts.e - The offset at which this sentence ends.
public LinkedVector(LinkedChild c,
int s,
int e)
previous and
next links are filled in by every child.
c - Any child in this vector.s - The offset at which this sentence starts.e - The offset at which this sentence ends.
public LinkedVector(LinkedVector p,
int s,
int e)
p - The previous child in the parent vector.s - The offset at which this sentence starts.e - The offset at which this sentence ends.| Method Detail |
|---|
public boolean add(LinkedChild c)
c - The child to add.public LinkedChild remove(int i)
i - The index of the child to remove.
null if there was no child
at that index.
public boolean insert(LinkedChild c,
int i)
c - The child to insert.i - The index at which to insert the child.
true if and only if the insert was successful.public LinkedChild get(int i)
i - The index from which to retrieve a child.
null if
there was no child at that index.public int size()
public java.lang.Object clone()
clone in class LinkedChild
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||