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

Constructor Index

 o DataLoopNameListNode()
no-arg constructor
 o DataLoopNameListNode(DataLoopNameListNode)
copy constructor
 o DataLoopNameListNode(NameListVector)
Copy a vector of LoopNameListNodes

Method Index

 o addElement(LoopNameListNode)
Just like the Vector method of the same name.
 o capacity()
Just like the Vector method of the same name.
 o clone()
Allocates a new copy (clone) of this StarNode and returns a reference to it.
 o contains(LoopNameListNode)
Just like the Vector method of the same name.
 o elementAt(int)
Just like the Vector method of the same name.
 o elements()
Just like the Vector method of the same name.
 o firstElement()
Just like the Vector method of the same name.
 o getLabel()
Returns the name of the first tag in the list, which is sometimes used to refer to the whole loop list.
 o indexOf(LoopNameListNode)
Just like the Vector method of the same name.
 o indexOf(LoopNameListNode, int)
Just like the Vector method of the same name.
 o insertElementAt(LoopNameListNode, int)
Just like the Vector method of the same name.
 o isEmpty()
Just like the Vector method of the same name.
 o lastElement()
Just like the Vector method of the same name.
 o lastIndexOf(LoopNameListNode)
Just like the Vector method of the same name.
 o lastIndexOf(LoopNameListNode, int)
Just like the Vector method of the same name.
 o removeElement(LoopNameListNode)
Just like the Vector method of the same name.
 o removeElementAt(int)
Just like the Vector method of the same name.
 o searchByName(String)
Find the name given in this name list.
 o searchForType(Class)
Find the type given in this name list.
 o setElementAt(LoopNameListNode, int)
Just like the Vector method of the same name.
 o setSize(int)
Just like the Vector method of the same name.
 o size()
Just like the Vector method of the same name.
 o tagPositionDeep(String, RemoteInt, RemoteInt)
Get the index of the given name.

Constructors

 o DataLoopNameListNode
 public DataLoopNameListNode()
no-arg constructor

 o DataLoopNameListNode
 public DataLoopNameListNode(DataLoopNameListNode copyMe)
copy constructor

 o DataLoopNameListNode
 public DataLoopNameListNode(NameListVector copyMe)
Copy a vector of LoopNameListNodes

Methods

 o clone
 public Object clone()
Allocates a new copy (clone) of this StarNode and returns a reference to it.

Overrides:
clone in class StarNode
 o setSize
 public void setSize(int newSize)
Just like the Vector method of the same name.

See Also:
setSize
 o capacity
 public int capacity()
Just like the Vector method of the same name.

See Also:
capacity
 o size
 public int size()
Just like the Vector method of the same name.

See Also:
size
 o isEmpty
 public boolean isEmpty()
Just like the Vector method of the same name.

See Also:
isEmpty
 o elements
 public Enumeration elements()
Just like the Vector method of the same name.

See Also:
Enumeration
 o contains
 public boolean contains(LoopNameListNode row)
Just like the Vector method of the same name.

See Also:
contains
 o indexOf
 public int indexOf(LoopNameListNode row)
Just like the Vector method of the same name.

See Also:
indexOf
 o indexOf
 public int indexOf(LoopNameListNode row,
                    int index)
Just like the Vector method of the same name.

See Also:
indexOf
 o lastIndexOf
 public int lastIndexOf(LoopNameListNode row)
Just like the Vector method of the same name.

See Also:
lastIndexOf
 o lastIndexOf
 public int lastIndexOf(LoopNameListNode row,
                        int index)
Just like the Vector method of the same name.

See Also:
lastIndexOf
 o elementAt
 public LoopNameListNode elementAt(int index)
Just like the Vector method of the same name.

See Also:
elementAt
 o firstElement
 public LoopNameListNode firstElement()
Just like the Vector method of the same name.

See Also:
firstElement
 o lastElement
 public LoopNameListNode lastElement()
Just like the Vector method of the same name.

See Also:
lastElement
 o setElementAt
 public void setElementAt(LoopNameListNode row,
                          int index)
Just like the Vector method of the same name.

See Also:
setElementAt
 o removeElementAt
 public void removeElementAt(int index)
Just like the Vector method of the same name.

See Also:
removeElementAt
 o insertElementAt
 public void insertElementAt(LoopNameListNode row,
                             int index)
Just like the Vector method of the same name.

See Also:
insertElementAt
 o addElement
 public void addElement(LoopNameListNode row)
Just like the Vector method of the same name.

See Also:
addElement
 o removeElement
 public boolean removeElement(LoopNameListNode row)
Just like the Vector method of the same name.

See Also:
removeElement
 o 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.)
 o 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
 o searchForType
 public VectorCheckType searchForType(Class type)
Find the type given in this name list.

Parameters:
searchFor - look for this tag name.
 o 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