public class ListRepresentation extends Representation implements java.lang.Iterable<Representation>
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<Representation> |
list
The list represented by this representation.
|
| Constructor and Description |
|---|
ListRepresentation()
Creates an empty list representation
|
ListRepresentation(java.util.List<? extends Representation> list) |
ListRepresentation(Representation... list) |
ListRepresentation(Vector<? extends Representation> vector) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Representation value)
Adds a representation to the list (same as
put(Representation)). |
boolean |
equals(java.lang.Object obj) |
Representation |
get(int i)
Retrieves the
i-th entry in this list. |
Representation[] |
getArray()
Retrieves an array version of the list.
|
java.util.List<Representation> |
getList()
Retrieves an immutable view of the list.
|
int |
hashCode() |
java.util.Iterator<Representation> |
iterator()
Constructs an
Iterator over the list. |
void |
put(Representation value)
Adds a representation to the list (same as
add(Representation)). |
int |
size()
Retrieves the size of the represented list.
|
java.util.stream.Stream<Representation> |
stream()
Constructs a
Stream over the list. |
java.lang.String |
toString() |
bigInt, bytes, list, map, obj, repr, strprotected final java.util.List<Representation> list
public ListRepresentation()
public ListRepresentation(Vector<? extends Representation> vector)
public ListRepresentation(java.util.List<? extends Representation> list)
public ListRepresentation(Representation... list)
public Representation get(int i)
i-th entry in this list.i - the index of the entry to retrievepublic int size()
public void put(Representation value)
add(Representation)).value - the representation to addpublic void add(Representation value)
put(Representation)).value - the representation to addpublic java.util.List<Representation> getList()
public Representation[] getArray()
public java.util.Iterator<Representation> iterator()
Iterator over the list.iterator in interface java.lang.Iterable<Representation>public java.util.stream.Stream<Representation> stream()
Stream over the list.public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object