public class ListSet<E> extends ArrayList<E>
contains(Object)
method. Each inserted object must by unique (as
specified by AbstractList.equals(Object)
). The set(int, Object)
method
allows duplicates because of the way Collections.sort(java.util.List)
works.
This class is subject to change and should not be used outside Vaadin core.modCount
Constructor and Description |
---|
ListSet() |
ListSet(Collection<? extends E> c) |
ListSet(int initialCapacity) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e) |
void |
add(int index,
E element)
Works as java.util.ArrayList#add(int, java.lang.Object) but returns
immediately if the element is already in the ListSet.
|
boolean |
addAll(Collection<? extends E> c) |
boolean |
addAll(int index,
Collection<? extends E> c) |
void |
clear() |
Object |
clone() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
int |
indexOf(Object o) |
int |
lastIndexOf(Object o) |
E |
remove(int index) |
boolean |
remove(Object o) |
protected void |
removeRange(int fromIndex,
int toIndex) |
E |
set(int index,
E element) |
ensureCapacity, forEach, get, isEmpty, iterator, listIterator, listIterator, removeAll, removeIf, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
toString
finalize, getClass, notify, notifyAll, wait, wait, wait
parallelStream, stream
public ListSet()
public ListSet(Collection<? extends E> c)
public ListSet(int initialCapacity)
public boolean contains(Object o)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<E>
containsAll
in interface List<E>
containsAll
in class AbstractCollection<E>
public boolean add(E e)
public void add(int index, E element)
public boolean addAll(Collection<? extends E> c)
public boolean addAll(int index, Collection<? extends E> c)
public void clear()
public int indexOf(Object o)
public int lastIndexOf(Object o)
lastIndexOf
in interface List<E>
lastIndexOf
in class ArrayList<E>
public E remove(int index)
public boolean remove(Object o)
protected void removeRange(int fromIndex, int toIndex)
removeRange
in class ArrayList<E>
Copyright © 2019 Vaadin Ltd. All rights reserved.