Package org.apache.flink.types
Class ListValue<V extends Value>
- java.lang.Object
-
- org.apache.flink.types.ListValue<V>
-
- Type Parameters:
V- Type of the list elements.
- All Implemented Interfaces:
Serializable,Iterable<V>,Collection<V>,List<V>,IOReadableWritable,Value
@Public public abstract class ListValue<V extends Value> extends Object implements Value, List<V>
Generic list base type for PACT programs that implements the Value and List interfaces. PactList encapsulates a Java ArrayList object.- See Also:
Value,List,ArrayList, Serialized Form
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, V element)booleanadd(V e)booleanaddAll(int index, Collection<? extends V> c)booleanaddAll(Collection<? extends V> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)booleanequals(Object obj)Vget(int index)inthashCode()intindexOf(Object o)booleanisEmpty()Iterator<V>iterator()intlastIndexOf(Object o)ListIterator<V>listIterator()ListIterator<V>listIterator(int index)voidread(DataInputView in)Reads the object's internal data from the given data input view.Vremove(int index)booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)Vset(int index, V element)intsize()List<V>subList(int fromIndex, int toIndex)Object[]toArray()<T> T[]toArray(T[] a)StringtoString()voidwrite(DataOutputView out)Writes the object's internal data to the given data output view.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
replaceAll, sort, spliterator
-
-
-
-
Constructor Detail
-
ListValue
public ListValue()
Initializes the encapsulated list with an empty ArrayList.- See Also:
ArrayList
-
ListValue
public ListValue(Collection<V> c)
Initializes the encapsulated list with an ArrayList filled with all object contained in the specified Collection object.- Parameters:
c- Collection of initial element of the encapsulated list.- See Also:
ArrayList,Collection
-
-
Method Detail
-
read
public void read(DataInputView in) throws IOException
Description copied from interface:IOReadableWritableReads the object's internal data from the given data input view.- Specified by:
readin interfaceIOReadableWritable- Parameters:
in- the input view to read the data from- Throws:
IOException- thrown if any error occurs while reading from the input stream
-
write
public void write(DataOutputView out) throws IOException
Description copied from interface:IOReadableWritableWrites the object's internal data to the given data output view.- Specified by:
writein interfaceIOReadableWritable- Parameters:
out- the output view to receive the data.- Throws:
IOException- thrown if any error occurs while writing to the output stream
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object obj)
-
add
public boolean add(V e)
-
addAll
public boolean addAll(Collection<? extends V> c)
-
addAll
public boolean addAll(int index, Collection<? extends V> c)
-
clear
public void clear()
-
contains
public boolean contains(Object o)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<V extends Value>- Specified by:
containsAllin interfaceList<V extends Value>
-
isEmpty
public boolean isEmpty()
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList<V extends Value>
-
listIterator
public ListIterator<V> listIterator()
- Specified by:
listIteratorin interfaceList<V extends Value>
-
listIterator
public ListIterator<V> listIterator(int index)
- Specified by:
listIteratorin interfaceList<V extends Value>
-
remove
public boolean remove(Object o)
-
removeAll
public boolean removeAll(Collection<?> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
size
public int size()
-
toArray
public Object[] toArray()
-
-