V
- Type of the list elements.@Public public abstract class ListValue<V extends Value> extends Object implements Value, List<V>
Value
,
List
,
ArrayList
,
Serialized FormConstructor and Description |
---|
ListValue()
Initializes the encapsulated list with an empty ArrayList.
|
ListValue(Collection<V> c)
Initializes the encapsulated list with an ArrayList filled with all object contained in the
specified Collection object.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
V element) |
boolean |
add(V e) |
boolean |
addAll(Collection<? extends V> c) |
boolean |
addAll(int index,
Collection<? extends V> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
equals(Object obj) |
V |
get(int index) |
int |
hashCode() |
int |
indexOf(Object o) |
boolean |
isEmpty() |
Iterator<V> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<V> |
listIterator() |
ListIterator<V> |
listIterator(int index) |
void |
read(DataInputView in)
Reads the object's internal data from the given data input view.
|
V |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
V |
set(int index,
V element) |
int |
size() |
List<V> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
String |
toString() |
void |
write(DataOutputView out)
Writes the object's internal data to the given data output view.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
replaceAll, sort, spliterator
parallelStream, removeIf, stream
public ListValue()
ArrayList
public ListValue(Collection<V> c)
c
- Collection of initial element of the encapsulated list.ArrayList
,
Collection
public void read(DataInputView in) throws IOException
IOReadableWritable
read
in interface IOReadableWritable
in
- the input view to read the data fromIOException
- thrown if any error occurs while reading from the input streampublic void write(DataOutputView out) throws IOException
IOReadableWritable
write
in interface IOReadableWritable
out
- the output view to receive the data.IOException
- thrown if any error occurs while writing to the output streampublic int hashCode()
public boolean equals(Object obj)
public boolean add(V e)
public boolean addAll(Collection<? extends V> c)
public boolean addAll(int index, Collection<? extends V> c)
public void clear()
public boolean contains(Object o)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<V extends Value>
containsAll
in interface List<V extends Value>
public boolean isEmpty()
public int lastIndexOf(Object o)
lastIndexOf
in interface List<V extends Value>
public ListIterator<V> listIterator()
listIterator
in interface List<V extends Value>
public ListIterator<V> listIterator(int index)
listIterator
in interface List<V extends Value>
public boolean remove(Object o)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public int size()
public Object[] toArray()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.