Class CommonsVector<ELEMENTTYPE>
java.lang.Object
java.util.AbstractCollection<ELEMENTTYPE>
java.util.AbstractList<ELEMENTTYPE>
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,SequencedCollection<ELEMENTTYPE>
public class CommonsVector<ELEMENTTYPE>
extends Vector<ELEMENTTYPE>
implements ICommonsList<ELEMENTTYPE>
A special
Vector implementation based on ICommonsList.- Author:
- Philip Helger
- See Also:
-
Field Summary
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementDataFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionCommonsVector(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
Modifier and TypeMethodDescriptionstatic <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> Create a new empty list.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, trimToSizeMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods 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, setAllMappedMethods 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, getCountMethods inherited from interface com.helger.commons.collection.impl.ICommonsList
getAll, getAllInstanceOf, getAllMapped, getAllMapped, getAsUnmodifiable, getAtIndex, getFirst, getFirst, getFirstOrNull, getLast, getLast, getLastOrNull, getSortedInline, removeAndReturnElementAtIndex, removeAtIndex, removeFirst, removeFirstOrNull, removeLast, removeLastOrNull, reverse, setFirst, setLast, swapItemsMethods inherited from interface com.helger.commons.lang.IHasSize
isEmpty, isNotEmpty, sizeMethods inherited from interface java.util.List
add, add, addAll, addAll, addFirst, addLast, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, reversed, set, size, sort, spliterator, subList, toArray, toArray
-
Constructor Details
-
CommonsVector
public CommonsVector() -
CommonsVector
-
CommonsVector
-
CommonsVector
-
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
-
CommonsVector
-
CommonsVector
public CommonsVector(@Nullable SRCTYPE[] aValues, @Nonnull Function<? super SRCTYPE, ? extends ELEMENTTYPE> aMapper)
-
-
Method Details
-
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
- 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)
-