T
- the type of element@Immutable public class ImmutableAppendedList<T> extends Object implements List<T>
Constructor and Description |
---|
ImmutableAppendedList(List<T> parent,
T element)
Create an instance using the supplied parent list and an element to be virtually appended to the parent.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
T element) |
boolean |
add(T o) |
boolean |
addAll(Collection<? extends T> c) |
boolean |
addAll(int index,
Collection<? extends T> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
equals(Object obj) |
T |
get(int index) |
int |
hashCode() |
int |
indexOf(Object o) |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<T> |
listIterator() |
ListIterator<T> |
listIterator(int index) |
T |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
T |
set(int index,
T element) |
int |
size() |
List<T> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<X> X[] |
toArray(X[] a) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
replaceAll, sort, spliterator
parallelStream, removeIf, stream
public ImmutableAppendedList(List<T> parent, T element)
parent
- the parent listelement
- the child element (may be null)IllegalArgumentException
- if the reference to the parent list is nullpublic boolean contains(Object o)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<T>
containsAll
in interface List<T>
public boolean isEmpty()
public int lastIndexOf(Object o)
lastIndexOf
in interface List<T>
public ListIterator<T> listIterator()
listIterator
in interface List<T>
public ListIterator<T> listIterator(int index)
listIterator
in interface List<T>
public int size()
public Object[] toArray()
public <X> X[] toArray(X[] a)
public int hashCode()
public boolean equals(Object obj)
public boolean add(T o)
public boolean addAll(Collection<? extends T> c)
public boolean addAll(int index, Collection<? extends T> c)
public void clear()
public boolean remove(Object o)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.