All Packages Class Hierarchy This Package Previous Next Index
Class openjava.ptree.ArrayInitializer
java.lang.Object
|
+----openjava.ptree.PtreeObject
|
+----openjava.ptree.List
|
+----openjava.ptree.ArrayInitializer
- public class ArrayInitializer
- extends List
- implements VariableInitializer
The ArrayInitializer class presents initializer list of array elements.
- See Also:
- Ptree, List, VariableInitializer
-
ArrayInitializer()
- Allocates a new ArrayInitializer.
-
ArrayInitializer(VariableInitializer)
-
-
ArrayInitializer(VariableInitializer, VariableInitializer)
-
-
addElement(VariableInitializer)
- Adds the specified element after the list
This causes side-effect.
-
append(ArrayInitializer)
- Appends a list after this list.
-
elementAt(int)
- Gets the specified element at
This causes side-effect.
-
getFirst()
- Returns the first element
-
getRest()
- Returns the new list from this list's element except for
the first element
-
insertElementAt(VariableInitializer, int)
- Inserts the specified element into the list
before the specified element of the list.
-
lastElement()
-
-
setElementAt(VariableInitializer, int)
- Sets the specified element at the specified place of the list
-
writeCode()
- Writes the code this parse-tree presents for.
ArrayInitializer
public ArrayInitializer()
- Allocates a new ArrayInitializer.
- Parameters:
- arrayinit - prototype object
ArrayInitializer
public ArrayInitializer(VariableInitializer vi0)
ArrayInitializer
public ArrayInitializer(VariableInitializer vi0,
VariableInitializer vi1)
writeCode
public void writeCode()
- Writes the code this parse-tree presents for.
- Overrides:
- writeCode in class List
elementAt
public VariableInitializer elementAt(int n)
- Gets the specified element at
This causes side-effect.
setElementAt
public void setElementAt(VariableInitializer p,
int n)
- Sets the specified element at the specified place of the list
- Parameters:
- p - element
- n - the number where to set element
addElement
public void addElement(VariableInitializer p)
- Adds the specified element after the list
This causes side-effect.
- Parameters:
- p - VariableInitializer to be inserted into the list
insertElementAt
public void insertElementAt(VariableInitializer p,
int n)
- Inserts the specified element into the list
before the specified element of the list.
This causes side-effect.
- Parameters:
- p - the element to be inserted into the list
- n - number of the element before which insertion ocuurs
getFirst
public VariableInitializer getFirst()
- Returns the first element
- Returns:
- s the first element
getRest
public ArrayInitializer getRest()
- Returns the new list from this list's element except for
the first element
- Returns:
- s the rest list except for the first element
lastElement
public VariableInitializer lastElement()
append
public void append(ArrayInitializer lst)
- Appends a list after this list.
- Parameters:
- lst - a list to be appended
All Packages Class Hierarchy This Package Previous Next Index