|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.griphyn.vdl.Chimera
org.griphyn.vdl.classes.VDL
org.griphyn.vdl.classes.Value
org.griphyn.vdl.classes.List
public class List
This class implements the list argument type used for parameters passed to transformations from derivations.
Value,
Scalar,
Serialized Form| Field Summary | |
|---|---|
private ArrayList |
m_scalarList
A list is just an ordered bunch of Scalar. |
| Fields inherited from class org.griphyn.vdl.classes.Value |
|---|
LIST, SCALAR |
| Constructor Summary | |
|---|---|
List()
Default ctor. |
|
List(Scalar firstChild)
Convenience ctor: Initializes the list, and stores the given Scalar as first child into the list. |
|
| Method Summary | |
|---|---|
void |
addScalar(int index,
Scalar vScalar)
Accessor: Insert a Scalar at a specific position. |
void |
addScalar(Scalar vScalar)
Accessor: Appends as Scalar value to the list. |
Object |
clone()
Creates and returns a copy of this object. |
boolean |
containsLFN(String filename,
int linkage)
Determines if the list contains an LFN of the specified linkage. |
Enumeration |
enumerateScalar()
Deprecated. Use the new Collection based interfaces |
List |
getAllLFN(int linkage)
Determines all LFN instances of a given scalar that match the specified linkage. |
int |
getContainerType()
Accessor: Obtains the value type of this class. |
List |
getLFNList(int linkage)
Determines all LFN instances of a given scalar that match the specified linkage. |
Scalar[] |
getScalar()
Deprecated. Use the new Collection based interfaces |
Scalar |
getScalar(int index)
Accessor: Obtains the value of a specific item in the list. |
int |
getScalarCount()
Accessor: Obtains the element count of the internal list |
List |
getScalarList()
Accessor: Gets an array of all Scalars in the list. |
String |
getSymbolicType()
This method determines which container is being used in the abstract base class in order to kludgy statements when printing debug info. |
Iterator |
iterateScalar()
Accessor: constructs the iterator for the List items. |
ListIterator |
listIterateScalar()
Accessor: constructs the iterator for the List items. |
ListIterator |
listIterateScalar(int start)
Accessor: constructs the iterator for the List items. |
void |
removeAllScalar()
Accessor: Removes all elements in the List. |
Scalar |
removeScalar(int index)
Accessor: Removes a single element from the List. |
void |
setScalar(Collection scalars)
Accessor: Replaces all elements with a new list of Scalars. |
void |
setScalar(int index,
Scalar vScalar)
Accessor: Overwrite an element at a given position. |
void |
setScalar(Scalar[] scalarArray)
Deprecated. Use the new Collection based interfaces |
void |
toString(Writer stream)
Dumps the list and all its contents into a string. |
void |
toXML(Writer stream,
String indent,
String namespace)
Dump the state of the current element as XML output. |
| Methods inherited from class org.griphyn.vdl.classes.Value |
|---|
getName, isInRange, setName |
| Methods inherited from class org.griphyn.vdl.Chimera |
|---|
escape, quote, toString, toXML, toXML, writeAttribute |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private ArrayList m_scalarList
Scalar.
| Constructor Detail |
|---|
public List()
public List(Scalar firstChild)
Scalar as first child into the list.
firstChild - is the first element in the list| Method Detail |
|---|
public Object clone()
clone in class Valuepublic int getContainerType()
List objects can be
distinguished from Scalar objects without using the
instanceof operator.
getContainerType in class ValueValue.LISTpublic String getSymbolicType()
getSymbolicType in class Value
public void addScalar(Scalar vScalar)
throws IndexOutOfBoundsException
Scalar value to the list.
vScalar - is the Scalar to append to the list.
IndexOutOfBoundsException - if the value cannot be added.Scalar
public void addScalar(int index,
Scalar vScalar)
throws IndexOutOfBoundsException
Scalar at a specific position.
index - is the position to insert the item intovScalar - is the Scalar to append to the list.
IndexOutOfBoundsException - if the value cannot be added.Scalarpublic Enumeration enumerateScalar()
List items.
public List getAllLFN(int linkage)
getAllLFN in class Valuelinkage - is the linkage to check for, -1 for all filenames.
Scalar.getAllLFN( int ),
LFNpublic List getLFNList(int linkage)
getLFNList in class Valuelinkage - is the linkage to check for, -1 for all filenames.
Scalar.getLFNList( int ),
Derivation.getLFNList( int ),
LFN
public boolean containsLFN(String filename,
int linkage)
containsLFN in class Valuefilename - is the name of the LFNlinkage - is the linkage to check for, -1 for any linkage type.
LFN,
Scalar.containsLFN( String, int )
public Scalar getScalar(int index)
throws IndexOutOfBoundsException
index - is the position of which to obtain the value of.
Scalar at the specified position.
IndexOutOfBoundsException - if the index points to an element
that is beyond the list boundaries.public Scalar[] getScalar()
Scalars in the list.
Scalars.Scalarpublic int getScalarCount()
public List getScalarList()
Scalars in the list.
This list is read-only.
Scalars.Scalarpublic Iterator iterateScalar()
List items.
public ListIterator listIterateScalar()
List items.
public ListIterator listIterateScalar(int start)
List items.
start - is the starting position for the sub-iteration.
public void removeAllScalar()
List.
public Scalar removeScalar(int index)
List. Each
component in this vector with an index greater or equal to the
specified index is shifted downward to have an index one smaller
than the value it had previously. The size of this vector is
decreased by 1.
index - is the position at which an element is to be removed.
Scalar that was removed.
ArrayIndexOutOfBoundsException - if the index was invalid.
public void setScalar(int index,
Scalar vScalar)
throws IndexOutOfBoundsException
index - is the position to use. It must be within the list.vScalar - is the new value to replace the element with.
IndexOutOfBoundsException - if the position is outside the list.public void setScalar(Scalar[] scalarArray)
Scalars.
scalarArray - is the list to replace the original list with.public void setScalar(Collection scalars)
Scalars.
scalars - is the list to replace the original list with.
public void toString(Writer stream)
throws IOException
toString in class Chimerastream - is a stream opened and ready for writing. This can also
be a string stream for efficient output.
IOException - if something fishy happens to the stream.
public void toXML(Writer stream,
String indent,
String namespace)
throws IOException
toXML in class Chimerastream - is a stream opened and ready for writing. This can also
be a string stream for efficient output.indent - is a String of spaces used for pretty
printing. The initial amount of spaces should be an empty string.
The parameter is used internally for the recursive traversal.namespace - is the XML schema namespace prefix. If neither
empty nor null, each element will be prefixed with this prefix,
and the root element will map the XML namespace.
IOException - if something fishy happens to the stream.BufferedWriter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||