Package org.biojava.utils
Class ListTools
java.lang.Object
org.biojava.utils.ListTools
- All Implemented Interfaces:
Serializable
- Author:
- Matthew Pocock, Thomas Down, Mark Schreiber
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static interface
Maps one object to another.static class
A list that represents a series of values.static class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List
createList
(Object[] a) static List
createList
(List l) 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
-
Field Details
-
NULL_MAPPER
-
-
Constructor Details
-
ListTools
public ListTools()
-
-
Method Details
-
nonRemoveIterator
-
createList
-
createList
-
createSeriesList
Create a new SeriesList with the given leader, trailer and size.- Parameters:
leader
- the String that will prefix the indextrailer
- the String that will suffix the indexsize
- the length of the list- Throws:
NullPointerException
- if leader or trailer are null (use the empty string instead)IllegalArgumentException
- if the size is negative
-
mapList
-
mapSet
-
mapMap
-