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() |
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)
contains
in interface Collection<T>
contains
in interface List<T>
List.contains(java.lang.Object)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<T>
containsAll
in interface List<T>
List.containsAll(java.util.Collection)
public T get(int index)
get
in interface List<T>
List.get(int)
public int indexOf(Object o)
indexOf
in interface List<T>
List.indexOf(java.lang.Object)
public boolean isEmpty()
isEmpty
in interface Collection<T>
isEmpty
in interface List<T>
List.isEmpty()
public Iterator<T> iterator()
iterator
in interface Iterable<T>
iterator
in interface Collection<T>
iterator
in interface List<T>
List.iterator()
public int lastIndexOf(Object o)
lastIndexOf
in interface List<T>
List.lastIndexOf(java.lang.Object)
public ListIterator<T> listIterator()
listIterator
in interface List<T>
List.listIterator()
public ListIterator<T> listIterator(int index)
listIterator
in interface List<T>
List.listIterator(int)
public int size()
size
in interface Collection<T>
size
in interface List<T>
List.size()
public List<T> subList(int fromIndex, int toIndex)
subList
in interface List<T>
List.subList(int, int)
public Object[] toArray()
toArray
in interface Collection<T>
toArray
in interface List<T>
List.toArray()
public <X> X[] toArray(X[] a)
public int hashCode()
hashCode
in interface Collection<T>
hashCode
in interface List<T>
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in interface Collection<T>
equals
in interface List<T>
equals
in class Object
Object.equals(java.lang.Object)
public String toString()
toString
in class Object
Object.toString()
public void add(int index, T element)
add
in interface List<T>
List.add(int, Object)
public boolean add(T o)
add
in interface Collection<T>
add
in interface List<T>
List.add(Object)
public boolean addAll(Collection<? extends T> c)
addAll
in interface Collection<T>
addAll
in interface List<T>
List.addAll(java.util.Collection)
public boolean addAll(int index, Collection<? extends T> c)
addAll
in interface List<T>
List.addAll(int, java.util.Collection)
public void clear()
clear
in interface Collection<T>
clear
in interface List<T>
List.clear()
public boolean remove(Object o)
remove
in interface Collection<T>
remove
in interface List<T>
List.remove(java.lang.Object)
public T remove(int index)
remove
in interface List<T>
List.remove(int)
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<T>
removeAll
in interface List<T>
List.removeAll(java.util.Collection)
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<T>
retainAll
in interface List<T>
List.retainAll(java.util.Collection)
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.