All Packages Class Hierarchy This Package Previous Next Index
Class EDU.bmrb.starlibj.DataLoopNameListNode
java.lang.Object
|
+----EDU.bmrb.starlibj.StarNode
|
+----EDU.bmrb.starlibj.DataLoopNameListNode
- public class DataLoopNameListNode
- extends StarNode
- implements Cloneable
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" |
- See Also:
- LoopNameListNode
-
DataLoopNameListNode()
- no-arg constructor
-
DataLoopNameListNode(DataLoopNameListNode)
- copy constructor
-
DataLoopNameListNode(NameListVector)
- Copy a vector of LoopNameListNodes
-
addElement(LoopNameListNode)
- Just like the Vector method of the same name.
-
capacity()
- Just like the Vector method of the same name.
-
clone()
- Allocates a new copy (clone) of this StarNode and returns a reference
to it.
-
contains(LoopNameListNode)
- Just like the Vector method of the same name.
-
elementAt(int)
- Just like the Vector method of the same name.
-
elements()
- Just like the Vector method of the same name.
-
firstElement()
- Just like the Vector method of the same name.
-
getLabel()
- Returns the name of the first tag in the list, which is sometimes
used to refer to the whole loop list.
-
indexOf(LoopNameListNode)
- Just like the Vector method of the same name.
-
indexOf(LoopNameListNode, int)
- Just like the Vector method of the same name.
-
insertElementAt(LoopNameListNode, int)
- Just like the Vector method of the same name.
-
isEmpty()
- Just like the Vector method of the same name.
-
lastElement()
- Just like the Vector method of the same name.
-
lastIndexOf(LoopNameListNode)
- Just like the Vector method of the same name.
-
lastIndexOf(LoopNameListNode, int)
- Just like the Vector method of the same name.
-
removeElement(LoopNameListNode)
- Just like the Vector method of the same name.
-
removeElementAt(int)
- Just like the Vector method of the same name.
-
searchByName(String)
- Find the name given in this name list.
-
searchForType(Class)
- Find the type given in this name list.
-
setElementAt(LoopNameListNode, int)
- Just like the Vector method of the same name.
-
setSize(int)
- Just like the Vector method of the same name.
-
size()
- Just like the Vector method of the same name.
-
tagPositionDeep(String, RemoteInt, RemoteInt)
- Get the index of the given name.
DataLoopNameListNode
public DataLoopNameListNode()
- no-arg constructor
DataLoopNameListNode
public DataLoopNameListNode(DataLoopNameListNode copyMe)
- copy constructor
DataLoopNameListNode
public DataLoopNameListNode(NameListVector copyMe)
- Copy a vector of LoopNameListNodes
clone
public Object clone()
- Allocates a new copy (clone) of this StarNode and returns a reference
to it.
- Overrides:
- clone in class StarNode
setSize
public void setSize(int newSize)
- Just like the Vector method of the same name.
- See Also:
- setSize
capacity
public int capacity()
- Just like the Vector method of the same name.
- See Also:
- capacity
size
public int size()
- Just like the Vector method of the same name.
- See Also:
- size
isEmpty
public boolean isEmpty()
- Just like the Vector method of the same name.
- See Also:
- isEmpty
elements
public Enumeration elements()
- Just like the Vector method of the same name.
- See Also:
- Enumeration
contains
public boolean contains(LoopNameListNode row)
- Just like the Vector method of the same name.
- See Also:
- contains
indexOf
public int indexOf(LoopNameListNode row)
- Just like the Vector method of the same name.
- See Also:
- indexOf
indexOf
public int indexOf(LoopNameListNode row,
int index)
- Just like the Vector method of the same name.
- See Also:
- indexOf
lastIndexOf
public int lastIndexOf(LoopNameListNode row)
- Just like the Vector method of the same name.
- See Also:
- lastIndexOf
lastIndexOf
public int lastIndexOf(LoopNameListNode row,
int index)
- Just like the Vector method of the same name.
- See Also:
- lastIndexOf
elementAt
public LoopNameListNode elementAt(int index)
- Just like the Vector method of the same name.
- See Also:
- elementAt
firstElement
public LoopNameListNode firstElement()
- Just like the Vector method of the same name.
- See Also:
- firstElement
lastElement
public LoopNameListNode lastElement()
- Just like the Vector method of the same name.
- See Also:
- lastElement
setElementAt
public void setElementAt(LoopNameListNode row,
int index)
- Just like the Vector method of the same name.
- See Also:
- setElementAt
removeElementAt
public void removeElementAt(int index)
- Just like the Vector method of the same name.
- See Also:
- removeElementAt
insertElementAt
public void insertElementAt(LoopNameListNode row,
int index)
- Just like the Vector method of the same name.
- See Also:
- insertElementAt
addElement
public void addElement(LoopNameListNode row)
- Just like the Vector method of the same name.
- See Also:
- addElement
removeElement
public boolean removeElement(LoopNameListNode row)
- Just like the Vector method of the same name.
- See Also:
- removeElement
getLabel
public String getLabel()
- Returns the name of the first tag in the list, which is sometimes
used to refer to the whole loop list.
- Returns:
- null if the list is empty (which should only happen
when the list is still in creation.)
searchByName
public VectorCheckType searchByName(String searchFor)
- Find the name given in this name list.
The search for names is case-insensitive.
- Parameters:
- searchFor - look for this tag name, case insensitively.
- Overrides:
- searchByName in class StarNode
searchForType
public VectorCheckType searchForType(Class type)
- Find the type given in this name list.
- Parameters:
- searchFor - look for this tag name.
tagPositionDeep
public void tagPositionDeep(String tagName,
RemoteInt nestLevel,
RemoteInt column)
- Get the index of the given name. Returns the
nest depth and the column index within that nest depth.
(indexes start counting at zero, negative numbers returned
mean the tag was not found.)
Note that the search for tag names is always case-insensitive,
as per the STAR syntax.
- Parameters:
- 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.
All Packages Class Hierarchy This Package Previous Next Index