public class ListTools extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
ListTools.Doublet |
static interface |
ListTools.Mapper
Maps one object to another.
|
static class |
ListTools.SeriesList
A list that represents a series of values.
|
static class |
ListTools.Triplet |
Modifier and Type | Field and Description |
---|---|
static ListTools.Mapper |
NULL_MAPPER |
Constructor and Description |
---|
ListTools() |
Modifier and Type | Method and Description |
---|---|
static List |
createList(List l) |
static List |
createList(Object[] a) |
static ListTools.SeriesList |
createSeriesList(String leader,
String trailer,
int size)
Create a new SeriesList with the given leader, trailer and size.
|
static List |
mapList(List list,
ListTools.Mapper mapper) |
static Map |
mapMap(Map map,
ListTools.Mapper keyMapper,
ListTools.Mapper valMapper) |
static Set |
mapSet(Set set,
ListTools.Mapper mapper) |
static Iterator |
nonRemoveIterator(Iterator i) |
public static final ListTools.Mapper NULL_MAPPER
public ListTools()
public static Iterator nonRemoveIterator(Iterator i)
public static List createList(List l)
public static List createList(Object[] a)
public static ListTools.SeriesList createSeriesList(String leader, String trailer, int size)
leader
- the String that will prefix the indextrailer
- the String that will suffix the indexsize
- the length of the listNullPointerException
- if leader or trailer are null (use the empty
string instead)IllegalArgumentException
- if the size is negativepublic static List mapList(List list, ListTools.Mapper mapper)
public static Set mapSet(Set set, ListTools.Mapper mapper)
public static Map mapMap(Map map, ListTools.Mapper keyMapper, ListTools.Mapper valMapper)
Copyright © 2014 BioJava. All rights reserved.