Class ArrayCollection<T>
- java.lang.Object
-
- org.red5.compatibility.flex.messaging.io.ArrayCollection<T>
-
- Type Parameters:
T- type of collection elements
- All Implemented Interfaces:
Iterable<T>,Collection<T>,List<T>,IExternalizable
public class ArrayCollection<T> extends Object implements Collection<T>, List<T>, IExternalizable
FlexArrayCollectioncompatibility class.- Author:
- The Red5 Project, Joachim Bauch (jojo@struktur.de), Paul Gregoire (mondain@gmail.com)
- See Also:
- ArrayCollection
-
-
Constructor Summary
Constructors Constructor Description ArrayCollection()ArrayCollection(T[] source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, T element)booleanadd(T e)booleanaddAll(int index, Collection<? extends T> c)booleanaddAll(Collection<? extends T> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)Tget(int index)intindexOf(Object o)booleanisEmpty()Iterator<T>iterator()intlastIndexOf(Object o)ListIterator<T>listIterator()ListIterator<T>listIterator(int index)voidreadExternal(IDataInput input)Load custom object from stream.Tremove(int index)booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)Tset(int index, T element)voidsetSource(T[] source)intsize()List<T>subList(int fromIndex, int toIndex)T[]toArray()<T> T[]toArray(T[] a)voidwriteExternal(IDataOutput output)Store custom object to stream.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
-
-
-
Constructor Detail
-
ArrayCollection
public ArrayCollection()
-
ArrayCollection
public ArrayCollection(T[] source)
-
-
Method Detail
-
setSource
public void setSource(T[] source)
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(Object o)
-
toArray
public T[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
add
public boolean add(T e)
-
remove
public boolean remove(Object o)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<T>- Specified by:
containsAllin interfaceList<T>
-
addAll
public boolean addAll(Collection<? extends T> c)
-
removeAll
public boolean removeAll(Collection<?> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
clear
public void clear()
-
addAll
public boolean addAll(int index, Collection<? extends T> c)
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList<T>
-
listIterator
public ListIterator<T> listIterator()
- Specified by:
listIteratorin interfaceList<T>
-
listIterator
public ListIterator<T> listIterator(int index)
- Specified by:
listIteratorin interfaceList<T>
-
readExternal
public void readExternal(IDataInput input)
Description copied from interface:IExternalizableLoad custom object from stream.- Specified by:
readExternalin interfaceIExternalizable- Parameters:
input- object to be used for data loading
-
writeExternal
public void writeExternal(IDataOutput output)
Description copied from interface:IExternalizableStore custom object to stream.- Specified by:
writeExternalin interfaceIExternalizable- Parameters:
output- object to be used for data storing
-
-