Package org.silverpeas.core.util
Class SilverpeasArrayList<T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<T>
-
- org.silverpeas.core.util.SilverpeasArrayList<T>
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<T>
,Collection<T>
,List<T>
,RandomAccess
,SilverpeasList<T>
public class SilverpeasArrayList<T> extends ArrayList<T> implements SilverpeasList<T>
- Author:
- Yohann Chastagnier
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description SilverpeasArrayList()
SilverpeasArrayList(int initialCapacity)
SilverpeasArrayList(Collection<? extends T> c)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <U> SilverpeasList<U>
newEmptyListWithSameProperties()
Builds a new emptySilverpeasList
with the same properties than this list.long
originalListSize()
Gets the number of items the original list contains.-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.util.AbstractCollection
containsAll, toString
-
Methods inherited from class java.lang.Object
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
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
Methods inherited from interface org.silverpeas.core.util.SilverpeasList
isSlice
-
-
-
-
Constructor Detail
-
SilverpeasArrayList
public SilverpeasArrayList(int initialCapacity)
-
SilverpeasArrayList
public SilverpeasArrayList()
-
SilverpeasArrayList
public SilverpeasArrayList(Collection<? extends T> c)
-
-
Method Detail
-
newEmptyListWithSameProperties
public <U> SilverpeasList<U> newEmptyListWithSameProperties()
Description copied from interface:SilverpeasList
Builds a new emptySilverpeasList
with the same properties than this list.This method is mainly dedicated to be used for making a collector for the Java Stream API.
- Specified by:
newEmptyListWithSameProperties
in interfaceSilverpeasList<T>
- Type Parameters:
U
- the concrete type of the items of the returned list.- Returns:
- an empty
SilverpeasList
with the same properties than this list.
-
originalListSize
public long originalListSize()
Description copied from interface:SilverpeasList
Gets the number of items the original list contains.If the list is a slice of a larger one, the
SilverpeasList.originalListSize()
returns a higher result than the one ofList.size()
, otherwiseSilverpeasList.originalListSize()
andList.size()
returns the same result.- Specified by:
originalListSize
in interfaceSilverpeasList<T>
- Returns:
- the original size of the list as long.
-
-