|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--EDU.bmrb.starlibj.StarNode | +--EDU.bmrb.starlibj.DataLoopNameListNode
This class contains the list of lists of names that represents all the tag names for a loop. This class mimics the functionality of java.util.vector, so that programmers can learn it easier. Each element in this 'vector' is a LoopNameListNode (described elsewhere), which is a list of tagnames. Each element in this 'vector' is therefore one of the the nesting levels of the loop's names. Here is an example. Assume the original star file contained the following piece of text:
loop_ _tag_I _tag_II _tag_III loop_ _tag_A _tag_B loop_ _tag1 _tag2 _tag3 _tag4 ... loop values ...Then the DataLoopNameListNode to store those tag names would look like this:
index | contains |
---|---|
0 | a LoopNameListNode which in turn contains "_tag_I", "_tag_II", and "_tagIII" |
1 | a LoopNameListNode which in turn contains "_tag_A" and "_tag_B" |
2 | a LoopNameListNode which in turn contains "_tag_1", "_tag_2", "_tag3", and "_tag_4" |
LoopNameListNode
Fields inherited from class EDU.bmrb.starlibj.StarNode |
colNum, lineNum, parent, preComment |
Constructor Summary | |
DataLoopNameListNode()
no-arg constructor |
|
DataLoopNameListNode(DataLoopNameListNode copyMe)
copy constructor |
|
DataLoopNameListNode(NameListVector copyMe)
Copy a vector of LoopNameListNodes |
Method Summary | |
void |
addElement(LoopNameListNode row)
Just like the Vector method of the same name. |
int |
capacity()
Just like the Vector method of the same name. |
java.lang.Object |
clone()
Allocates a new copy (clone) of this StarNode and returns a reference to it. |
boolean |
contains(LoopNameListNode row)
Just like the Vector method of the same name. |
LoopNameListNode |
elementAt(int index)
Just like the Vector method of the same name. |
java.util.Enumeration |
elements()
Just like the Vector method of the same name. |
LoopNameListNode |
firstElement()
Just like the Vector method of the same name. |
java.lang.String |
getLabel()
Returns the name of the first tag in the list, which is sometimes used to refer to the whole loop list. |
int |
indexOf(LoopNameListNode row)
Just like the Vector method of the same name. |
int |
indexOf(LoopNameListNode row,
int index)
Just like the Vector method of the same name. |
void |
insertElementAt(LoopNameListNode row,
int index)
Just like the Vector method of the same name. |
boolean |
isEmpty()
Just like the Vector method of the same name. |
LoopNameListNode |
lastElement()
Just like the Vector method of the same name. |
int |
lastIndexOf(LoopNameListNode row)
Just like the Vector method of the same name. |
int |
lastIndexOf(LoopNameListNode row,
int index)
Just like the Vector method of the same name. |
boolean |
removeElement(LoopNameListNode row)
Just like the Vector method of the same name. |
void |
removeElementAt(int index)
Just like the Vector method of the same name. |
VectorCheckType |
searchByName(java.lang.String searchFor)
Find the name given in this name list. |
VectorCheckType |
searchForType(java.lang.Class type)
Find the type given in this name list. |
void |
setElementAt(LoopNameListNode row,
int index)
Just like the Vector method of the same name. |
void |
setSize(int newSize)
Just like the Vector method of the same name. |
int |
size()
Just like the Vector method of the same name. |
void |
tagPositionDeep(java.lang.String tagName,
RemoteInt nestLevel,
RemoteInt column)
Get the index of the given name. |
Methods inherited from class EDU.bmrb.starlibj.StarNode |
getColNum, getLineNum, getParallelCopy, getParent, getPreComment, searchByTagValue, searchForType, searchForTypeByName, searchForTypeByTagValue, setColNum, setLineNum, setParent, setPeer, setPreComment, Unparse |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DataLoopNameListNode()
public DataLoopNameListNode(DataLoopNameListNode copyMe)
public DataLoopNameListNode(NameListVector copyMe)
Method Detail |
public java.lang.Object clone()
StarNode
clone
in class StarNode
EDU.bmrb.starlibj.StarNode
StarFileNode
public void setSize(int newSize)
VectorCheckType.setSize
public int capacity()
VectorCheckType.capacity
public int size()
VectorCheckType.size
public boolean isEmpty()
VectorCheckType.isEmpty
public java.util.Enumeration elements()
VectorCheckType.Enumeration
public boolean contains(LoopNameListNode row)
VectorCheckType.contains
public int indexOf(LoopNameListNode row)
VectorCheckType.indexOf
public int indexOf(LoopNameListNode row, int index)
VectorCheckType.indexOf
public int lastIndexOf(LoopNameListNode row)
VectorCheckType.lastIndexOf
public int lastIndexOf(LoopNameListNode row, int index)
VectorCheckType.lastIndexOf
public LoopNameListNode elementAt(int index)
VectorCheckType.elementAt
public LoopNameListNode firstElement()
VectorCheckType.firstElement
public LoopNameListNode lastElement()
VectorCheckType.lastElement
public void setElementAt(LoopNameListNode row, int index)
VectorCheckType.setElementAt
public void removeElementAt(int index)
VectorCheckType.removeElementAt
public void insertElementAt(LoopNameListNode row, int index)
VectorCheckType.insertElementAt
public void addElement(LoopNameListNode row)
VectorCheckType.addElement
public boolean removeElement(LoopNameListNode row)
VectorCheckType.removeElement
public java.lang.String getLabel()
public VectorCheckType searchByName(java.lang.String searchFor)
searchByName
in class StarNode
searchFor
- look for this tag name, case insensitively.public VectorCheckType searchForType(java.lang.Class type)
searchFor
- look for this tag name.public void tagPositionDeep(java.lang.String tagName, RemoteInt nestLevel, RemoteInt column)
Note that the search for tag names is always case-insensitive, as per the STAR syntax.
tagName
- The tag to look for.nestLevel
- (out) - Returns the nesting level. The use of the
trivial "RemoteInt" class is required because Java can only
pass an int by value, and the class "Integer" doesn't have any
methods for setting the value after construction.column
- (out) - Returns the nesting level. The use of the
trivial "RemoteInt" class is required because Java can only
pass an int by value, and the class "Integer" doesn't have any
methods for setting the value after construction.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |