Package org.apache.poi.util
Class IntMapper<T>
- java.lang.Object
-
- org.apache.poi.util.IntMapper<T>
-
- All Implemented Interfaces:
Iterable<T>,Duplicatable
public class IntMapper<T> extends Object implements Duplicatable, Iterable<T>
A List of objects that are indexed AND keyed by an int; also allows for getting the index of a value in the listI am happy is someone wants to re-implement this without using the internal list and hashmap. If so could you please make sure that you can add elements half way into the list and have the value-key mappings update
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T value)Appends the specified element to the end of this listIntMapper<T>copy()Tget(int index)List<T>getElements()intgetIndex(T o)Iterator<T>iterator()intsize()Spliterator<T>spliterator()
-
-
-
Method Detail
-
add
public boolean add(T value)
Appends the specified element to the end of this list- Parameters:
value- element to be appended to this list.- Returns:
- true (as per the general contract of the Collection.add method).
-
size
public int size()
-
get
public T get(int index)
-
getIndex
public int getIndex(T o)
-
spliterator
public Spliterator<T> spliterator()
- Specified by:
spliteratorin interfaceIterable<T>- Since:
- POI 5.2.0
-
copy
public IntMapper<T> copy()
- Specified by:
copyin interfaceDuplicatable- Returns:
- a deep copy of the implementing class / instance
-
-