public class ConfEList extends ConfEObject implements Serializable, Cloneable
The arity of the list is the number of elements it contains.
Constructor and Description |
---|
ConfEList()
Create an empty list.
|
ConfEList(ConfEObject elem)
Create a list containing one element.
|
ConfEList(ConfEObject[] elems)
Create a list from an array of arbitrary E terms.
|
ConfEList(ConfEObject[] elems,
int start,
int count)
Create a list from an array of arbitrary E terms.
|
ConfEList(ConfInputStream buf)
Create a list from a stream containing an list encoded in E external
format.
|
ConfEList(String str)
Create a list of characters.
|
Modifier and Type | Method and Description |
---|---|
int |
arity()
Get the arity of the list.
|
Object |
clone() |
ConfEObject |
elementAt(int i)
Get the specified element from the list.
|
ConfEObject[] |
elements()
Get all the elements from the list as an array.
|
void |
encode(ConfOutputStream buf)
Convert this list to the equivalent E external representation.
|
boolean |
equals(Object o)
Determine if two lists are equal.
|
int |
hashCode() |
boolean |
proper() |
ConfEList |
reverse() |
void |
setProper(boolean p) |
String |
toString()
Get the string representation of the list.
|
decode
public ConfEList()
public ConfEList(String str)
str
- the characters from which to create the list.public ConfEList(ConfEObject elem)
elem
- the element to make the list from.public ConfEList(ConfEObject[] elems)
elems
- the array of terms from which to create the list.public ConfEList(ConfEObject[] elems, int start, int count)
elems
- the array of terms from which to create the list.start
- the offset of the first term to insert.count
- the number of terms to insert.public ConfEList(ConfInputStream buf) throws ConfEDecodeException
buf
- the stream containing the encoded list.ConfEDecodeException
- if the buffer does not contain a valid external
representation of an E list.public boolean proper()
public void setProper(boolean p)
public int arity()
public ConfEObject elementAt(int i)
i
- the index of the requested element. List elements are numbered
as array elements, starting at 0.public ConfEObject[] elements()
public ConfEList reverse()
public String toString()
toString
in class ConfEObject
public void encode(ConfOutputStream buf)
encode
in class ConfEObject
buf
- An output stream to which the encoded list should be written.public boolean equals(Object o)
equals
in class ConfEObject
o
- the list to compare to.public Object clone()
clone
in class ConfEObject