ELEMENTTYPE - The type of the element in the list@NotThreadSafe public class SingleElementList<ELEMENTTYPE> extends Object implements com.helger.commons.collection.impl.ICommonsList<ELEMENTTYPE>
ICommonsList interface handling exactly one
element and no more!| Constructor and Description |
|---|
SingleElementList() |
SingleElementList(ELEMENTTYPE aElement) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(ELEMENTTYPE aElement) |
void |
add(int nIndex,
ELEMENTTYPE aElement) |
boolean |
addAll(Collection<? extends ELEMENTTYPE> aElements) |
boolean |
addAll(int nIndex,
Collection<? extends ELEMENTTYPE> aElements) |
void |
clear() |
boolean |
contains(Object aElement) |
boolean |
containsAll(Collection<?> aElements) |
<T> SingleElementList<T> |
createInstance() |
boolean |
equals(Object o) |
ELEMENTTYPE |
get(int nIndex) |
SingleElementList<ELEMENTTYPE> |
getClone() |
int |
hashCode() |
int |
indexOf(Object aElement) |
boolean |
isEmpty() |
Iterator<ELEMENTTYPE> |
iterator() |
int |
lastIndexOf(Object aElement) |
ListIterator<ELEMENTTYPE> |
listIterator() |
ListIterator<ELEMENTTYPE> |
listIterator(int nIndex) |
ELEMENTTYPE |
remove(int nIndex) |
boolean |
remove(Object aElement) |
boolean |
removeAll(Collection<?> aElements) |
boolean |
retainAll(Collection<?> aElements) |
ELEMENTTYPE |
set(int nIndex,
ELEMENTTYPE aNewElement) |
int |
size() |
com.helger.commons.collection.impl.ICommonsList<ELEMENTTYPE> |
subList(int nFromIndex,
int nToIndex) |
Object[] |
toArray() |
<ARRAYELEMENTTYPE> |
toArray(ARRAYELEMENTTYPE[] aDest) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAll, getAllInstanceOf, getAllMapped, getAllMapped, getAsUnmodifiable, getAtIndex, getFirst, getFirst, getLast, getLast, getSortedInline, removeAndReturnElementAtIndex, removeAtIndex, removeFirst, removeLast, reverse, setFirst, setLast, swapItemsreplaceAll, sort, spliteratoraddAll, 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, setAllMappedparallelStream, removeIf, streamcontainsAny, containsNone, containsOnly, findAll, findAllInstanceOf, findAllMapped, findAllMapped, findAllMapped, findFirst, findFirst, findFirstIndex, findFirstMapped, findFirstMapped, findLastIndex, forEach, forEachBreakable, forEachByIndex, getCountpublic SingleElementList()
public SingleElementList(@Nullable ELEMENTTYPE aElement)
@Nonnull @ReturnsMutableCopy public <T> SingleElementList<T> createInstance()
createInstance in interface com.helger.commons.collection.impl.ICommonsList<ELEMENTTYPE>@Nonnull @ReturnsMutableCopy public SingleElementList<ELEMENTTYPE> getClone()
getClone in interface com.helger.commons.lang.ICloneable<com.helger.commons.collection.impl.ICommonsList<ELEMENTTYPE>>public boolean add(@Nullable ELEMENTTYPE aElement)
add in interface Collection<ELEMENTTYPE>add in interface List<ELEMENTTYPE>public void add(@Nonnegative int nIndex, @Nullable ELEMENTTYPE aElement)
add in interface List<ELEMENTTYPE>public boolean addAll(@Nonnull Collection<? extends ELEMENTTYPE> aElements)
addAll in interface Collection<ELEMENTTYPE>addAll in interface List<ELEMENTTYPE>public boolean addAll(@Nonnegative int nIndex, @Nonnull Collection<? extends ELEMENTTYPE> aElements)
addAll in interface List<ELEMENTTYPE>public void clear()
clear in interface Collection<ELEMENTTYPE>clear in interface List<ELEMENTTYPE>public boolean contains(@Nullable Object aElement)
contains in interface Collection<ELEMENTTYPE>contains in interface List<ELEMENTTYPE>public boolean containsAll(@Nonnull Collection<?> aElements)
containsAll in interface Collection<ELEMENTTYPE>containsAll in interface List<ELEMENTTYPE>public ELEMENTTYPE get(@Nonnegative int nIndex)
get in interface List<ELEMENTTYPE>public int indexOf(Object aElement)
indexOf in interface List<ELEMENTTYPE>public boolean isEmpty()
isEmpty in interface com.helger.commons.lang.IHasSizeisEmpty in interface Collection<ELEMENTTYPE>isEmpty in interface List<ELEMENTTYPE>@Nonnull public Iterator<ELEMENTTYPE> iterator()
iterator in interface Iterable<ELEMENTTYPE>iterator in interface Collection<ELEMENTTYPE>iterator in interface List<ELEMENTTYPE>public int lastIndexOf(@Nullable Object aElement)
lastIndexOf in interface List<ELEMENTTYPE>@Nonnull public ListIterator<ELEMENTTYPE> listIterator()
listIterator in interface List<ELEMENTTYPE>@Nonnull public ListIterator<ELEMENTTYPE> listIterator(int nIndex)
listIterator in interface List<ELEMENTTYPE>@Nullable public ELEMENTTYPE remove(int nIndex)
remove in interface List<ELEMENTTYPE>public boolean remove(@Nullable Object aElement)
remove in interface Collection<ELEMENTTYPE>remove in interface List<ELEMENTTYPE>public boolean removeAll(@Nullable Collection<?> aElements)
removeAll in interface Collection<ELEMENTTYPE>removeAll in interface List<ELEMENTTYPE>@UnsupportedOperation public boolean retainAll(@Nonnull Collection<?> aElements)
retainAll in interface Collection<ELEMENTTYPE>retainAll in interface List<ELEMENTTYPE>@Nullable public ELEMENTTYPE set(@Nonnegative int nIndex, @Nullable ELEMENTTYPE aNewElement)
set in interface List<ELEMENTTYPE>@Nonnegative public int size()
size in interface com.helger.commons.lang.IHasSizesize in interface Collection<ELEMENTTYPE>size in interface List<ELEMENTTYPE>@Nonnull @CodingStyleguideUnaware public com.helger.commons.collection.impl.ICommonsList<ELEMENTTYPE> subList(@Nonnegative int nFromIndex, @Nonnegative int nToIndex)
subList in interface List<ELEMENTTYPE>@Nonnull public Object[] toArray()
toArray in interface Collection<ELEMENTTYPE>toArray in interface List<ELEMENTTYPE>@Nonnull public <ARRAYELEMENTTYPE> ARRAYELEMENTTYPE[] toArray(@Nonnull ARRAYELEMENTTYPE[] aDest)
toArray in interface Collection<ELEMENTTYPE>toArray in interface List<ELEMENTTYPE>public boolean equals(Object o)
equals in interface Collection<ELEMENTTYPE>equals in interface List<ELEMENTTYPE>equals in class Objectpublic int hashCode()
hashCode in interface Collection<ELEMENTTYPE>hashCode in interface List<ELEMENTTYPE>hashCode in class ObjectCopyright © 2017–2020 Philip Helger. All rights reserved.