|
ContactCenters V. 0.9.9. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
umontreal.iro.lecuyer.collections.MergedCollection<E>
umontreal.iro.lecuyer.collections.MergedList<E>
E - the type of the element in the merged list.public class MergedList<E>
Represents a list providing a view of two lists side by side. This extends
the merged collection for implementing the List interface.
| Constructor Summary | |
|---|---|
MergedList(List<? extends E> list1,
List<? extends E> list2)
Constructs a new merged list from lists list1 and list2. |
|
| Method Summary | ||
|---|---|---|
void |
add(int index,
E element)
|
|
boolean |
addAll(int index,
Collection<? extends E> c)
|
|
boolean |
equals(Object o)
|
|
E |
get(int index)
|
|
List<? extends E> |
getFirstCollection()
Returns the reference to the first list in this merged list. |
|
List<? extends E> |
getSecondCollection()
Returns the reference to the second list in this merged list. |
|
int |
hashCode()
|
|
int |
indexOf(Object o)
|
|
int |
lastIndexOf(Object o)
|
|
ListIterator<E> |
listIterator()
|
|
ListIterator<E> |
listIterator(int index)
|
|
static
|
newRandomAccess(List<? extends E> list1,
List<? extends E> list2)
Attempts to construct a random-accessible merged list. |
|
E |
remove(int index)
|
|
E |
set(int index,
E element)
|
|
List<E> |
subList(int fromIndex,
int toIndex)
|
|
MergedList<E> |
tryToMakeRandomAccess()
Attempts to make this merged list random-accessible, i.e., supporting fast random access. |
|
| Methods inherited from class umontreal.iro.lecuyer.collections.MergedCollection |
|---|
contains, isEmpty, iterator, size |
| Methods inherited from class java.util.AbstractCollection |
|---|
add, addAll, clear, containsAll, remove, removeAll, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
| Constructor Detail |
|---|
public MergedList(List<? extends E> list1,
List<? extends E> list2)
list1 - the first list.list2 - the second list.
NullPointerException - if list1 or list2 are null.| Method Detail |
|---|
public List<? extends E> getFirstCollection()
getFirstCollection in class MergedCollection<E>public List<? extends E> getSecondCollection()
getSecondCollection in class MergedCollection<E>public MergedList<E> tryToMakeRandomAccess()
RandomAccess
interface, this method returns a merged list implementing
RandomAccess. Otherwise, the method returns this reference.
public static <E> MergedList<E> newRandomAccess(List<? extends E> list1,
List<? extends E> list2)
RandomAccess, this constructs
and returns a list implementing RandomAccess. Otherwise, the
constructed list does not implement the interface.
E - the type of elements in the merged list.list1 - the first list.list2 - the second list.
NullPointerException - if list1 or list2 are null.public boolean equals(Object o)
equals in interface Collection<E>equals in interface List<E>equals in class Objectpublic int hashCode()
hashCode in interface Collection<E>hashCode in interface List<E>hashCode in class Objectpublic E get(int index)
get in interface List<E>public int indexOf(Object o)
indexOf in interface List<E>public int lastIndexOf(Object o)
lastIndexOf in interface List<E>public ListIterator<E> listIterator()
listIterator in interface List<E>public ListIterator<E> listIterator(int index)
listIterator in interface List<E>
public void add(int index,
E element)
add in interface List<E>
public boolean addAll(int index,
Collection<? extends E> c)
addAll in interface List<E>public E remove(int index)
remove in interface List<E>
public E set(int index,
E element)
set in interface List<E>
public List<E> subList(int fromIndex,
int toIndex)
subList in interface List<E>
|
ContactCenters V. 0.9.9. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||