Class CommonsVector<ELEMENTTYPE>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.Vector<ELEMENTTYPE>
-
- com.helger.commons.collection.impl.CommonsVector<ELEMENTTYPE>
-
- Type Parameters:
ELEMENTTYPE- List element type
- All Implemented Interfaces:
ICommonsCollection<ELEMENTTYPE>,ICommonsIterable<ELEMENTTYPE>,ICommonsList<ELEMENTTYPE>,ICloneable<ICommonsList<ELEMENTTYPE>>,IHasSize,Serializable,Cloneable,Iterable<ELEMENTTYPE>,Collection<ELEMENTTYPE>,List<ELEMENTTYPE>,RandomAccess
public class CommonsVector<ELEMENTTYPE> extends Vector<ELEMENTTYPE> implements ICommonsList<ELEMENTTYPE>
A specialVectorimplementation based onICommonsList.- Author:
- Philip Helger
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description CommonsVector()CommonsVector(int nInitialCapacity)CommonsVector(ELEMENTTYPE aValue)CommonsVector(ELEMENTTYPE... aValues)CommonsVector(Iterable<? extends ELEMENTTYPE> aIterable)CommonsVector(Iterable<? extends SRCTYPE> aValues, Function<? super SRCTYPE,? extends ELEMENTTYPE> aMapper)CommonsVector(Collection<? extends ELEMENTTYPE> aCont)CommonsVector(Collection<? extends SRCTYPE> aValues, Function<? super SRCTYPE,? extends ELEMENTTYPE> aMapper)CommonsVector(SRCTYPE[] aValues, Function<? super SRCTYPE,? extends ELEMENTTYPE> aMapper)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <ELEMENTTYPE>
CommonsVector<ELEMENTTYPE>createFiltered(ELEMENTTYPE[] aValues, Predicate<? super ELEMENTTYPE> aFilter)static <ELEMENTTYPE>
CommonsVector<ELEMENTTYPE>createFiltered(Iterable<? extends ELEMENTTYPE> aValues, Predicate<? super ELEMENTTYPE> aFilter)static <SRCTYPE,ELEMENTTYPE>
CommonsVector<ELEMENTTYPE>createFiltered(Iterable<? extends SRCTYPE> aValues, Predicate<? super SRCTYPE> aFilter, Function<? super SRCTYPE,? extends ELEMENTTYPE> aMapper)static <SRCTYPE,ELEMENTTYPE>
CommonsVector<ELEMENTTYPE>createFiltered(SRCTYPE[] aValues, Predicate<? super SRCTYPE> aFilter, Function<? super SRCTYPE,? extends ELEMENTTYPE> aMapper)<T> CommonsVector<T>createInstance()Create a new empty list.CommonsVector<ELEMENTTYPE>getClone()-
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSize
-
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 com.helger.commons.collection.impl.ICommonsCollection
addAll, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addAllMapped, addAllMapped, addAllMapped, addAllMapped, addAllMapped, addAllMapped, addIf, addIfNotNull, addObject, getAtIndex, getAtIndex, getAtIndex, getAtIndexMapped, getAtIndexMapped, getAtIndexMapped, getAtIndexMapped, getCopyAsList, getCount, getSorted, iterator2, removeAll, removeObject, set, setAll, setAll, setAllMapped, setAllMapped
-
Methods inherited from interface com.helger.commons.collection.impl.ICommonsIterable
containsAny, containsNone, containsOnly, findAll, findAllInstanceOf, findAllMapped, findAllMapped, findAllMapped, findFirst, findFirst, findFirstIndex, findFirstMapped, findFirstMapped, findLastIndex, forEachBreakable, forEachByIndex, forEachThrowing, getCount
-
Methods inherited from interface com.helger.commons.collection.impl.ICommonsList
getAll, getAllInstanceOf, getAllMapped, getAllMapped, getAsUnmodifiable, getAtIndex, getFirst, getFirst, getLast, getLast, getSortedInline, removeAndReturnElementAtIndex, removeAtIndex, removeFirst, removeLast, reverse, setFirst, setLast, swapItems
-
Methods inherited from interface com.helger.commons.lang.IHasSize
isEmpty, isNotEmpty, size
-
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
-
-
-
-
Constructor Detail
-
CommonsVector
public CommonsVector()
-
CommonsVector
public CommonsVector(@Nonnegative int nInitialCapacity)
-
CommonsVector
public CommonsVector(@Nullable Collection<? extends ELEMENTTYPE> aCont)
-
CommonsVector
public CommonsVector(@Nullable Iterable<? extends ELEMENTTYPE> aIterable)
-
CommonsVector
public CommonsVector(@Nullable Collection<? extends SRCTYPE> aValues, @Nonnull Function<? super SRCTYPE,? extends ELEMENTTYPE> aMapper)
-
CommonsVector
public CommonsVector(@Nullable Iterable<? extends SRCTYPE> aValues, @Nonnull Function<? super SRCTYPE,? extends ELEMENTTYPE> aMapper)
-
CommonsVector
public CommonsVector(@Nullable ELEMENTTYPE aValue)
-
CommonsVector
@SafeVarargs public CommonsVector(@Nullable ELEMENTTYPE... aValues)
-
CommonsVector
public CommonsVector(@Nullable SRCTYPE[] aValues, @Nonnull Function<? super SRCTYPE,? extends ELEMENTTYPE> aMapper)
-
-
Method Detail
-
createInstance
@Nonnull @ReturnsMutableCopy public <T> CommonsVector<T> createInstance()
Description copied from interface:ICommonsListCreate a new empty list. Overwrite this if you don't want to useCommonsArrayList.- Specified by:
createInstancein interfaceICommonsList<ELEMENTTYPE>- Type Parameters:
T- List element type- Returns:
- A new empty list. Never
null.
-
getClone
@Nonnull @ReturnsMutableCopy public CommonsVector<ELEMENTTYPE> getClone()
- Specified by:
getClonein interfaceICloneable<ELEMENTTYPE>- Returns:
- A 100% deep-copy of the implementing class.
-
createFiltered
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> CommonsVector<ELEMENTTYPE> createFiltered(@Nullable Iterable<? extends ELEMENTTYPE> aValues, @Nullable Predicate<? super ELEMENTTYPE> aFilter)
-
createFiltered
@Nonnull @ReturnsMutableCopy public static <SRCTYPE,ELEMENTTYPE> CommonsVector<ELEMENTTYPE> createFiltered(@Nullable Iterable<? extends SRCTYPE> aValues, @Nullable Predicate<? super SRCTYPE> aFilter, @Nonnull Function<? super SRCTYPE,? extends ELEMENTTYPE> aMapper)
-
createFiltered
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> CommonsVector<ELEMENTTYPE> createFiltered(@Nullable ELEMENTTYPE[] aValues, @Nullable Predicate<? super ELEMENTTYPE> aFilter)
-
createFiltered
@Nonnull @ReturnsMutableCopy public static <SRCTYPE,ELEMENTTYPE> CommonsVector<ELEMENTTYPE> createFiltered(@Nullable SRCTYPE[] aValues, @Nullable Predicate<? super SRCTYPE> aFilter, @Nonnull Function<? super SRCTYPE,? extends ELEMENTTYPE> aMapper)
-
-