randoop.util
Class ListOfLists<T>
Object
SimpleList<T>
ListOfLists<T>
- All Implemented Interfaces:
- Serializable
public class ListOfLists<T>
extends SimpleList<T>
implements Serializable
Given a list of lists, defines methods that can access all the elements as if
they were part of a single list, without actually merging the lists.
This class is used for performance reasons. We want the ability to select
elements collected across several lists, but we observed that creating a
brand new list (i.e. via a sequence of List.addAll(..) operations can be very
expensive, because it happened in a hot spot (method
SequenceCollection.getSequencesThatYield).
- See Also:
- Serialized Form
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
lists
public final List<SimpleList<T>> lists
ListOfLists
public ListOfLists(SimpleList<T>... lists)
ListOfLists
public ListOfLists(List<SimpleList<T>> lists)
size
public int size()
- Specified by:
size in class SimpleList<T>
get
public T get(int index)
- Specified by:
get in class SimpleList<T>
toJDKList
public List<T> toJDKList()
- Description copied from class:
SimpleList
- Returns a java.util.List version of this list.
- Specified by:
toJDKList in class SimpleList<T>
toString
public String toString()
- Overrides:
toString in class Object