|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection java.util.AbstractList edu.umd.cfar.lamp.apploader.misc.FlattenedList
A list of lists that acts as a single list. Note that this only flattens one layer, not completely. For example, if I pass this a list containing two lists, and one list has a list as an element, that list will be returned as a list. Also, it does expect a list of lists.
Field Summary |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
FlattenedList(java.util.List inside)
Create a new list from the given list of lists. |
Method Summary | |
void |
clear()
Doesn't clear each list; instead, clears the list of lists. |
java.lang.Object |
get(int i)
Finds the ith element in the flattened list. |
java.util.List |
getInnerList()
Gets the backing list. |
boolean |
isEmpty()
Tests to see that all the component lists are empty. |
java.util.Iterator |
iterator()
Iterate through all elements of the lists in order. |
void |
setInnerList(java.util.List L)
Set the list backing this flattened list to something else. |
int |
size()
Gets the sum of the sizes of the individual lists. |
Methods inherited from class java.util.AbstractList |
add, add, addAll, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
Methods inherited from class java.util.AbstractCollection |
addAll, contains, 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 |
addAll, contains, containsAll, remove, removeAll, retainAll, toArray, toArray |
Constructor Detail |
public FlattenedList(java.util.List inside)
inside
- The list of lists.Method Detail |
public java.util.Iterator iterator()
public java.lang.Object get(int i)
AbstractList.get(int)
public int size()
List.size()
public boolean isEmpty()
List.isEmpty()
public void clear()
AbstractList.clear()
public java.util.List getInnerList()
public void setInnerList(java.util.List L)
L
- the new backing list
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |