public class IntMapper<T> extends java.lang.Object implements Duplicatable, java.lang.Iterable<T>
I 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
Constructor and Description |
---|
IntMapper()
create an IntMapper of default size
|
IntMapper(int initialCapacity) |
IntMapper(IntMapper<T> other) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(T value)
Appends the specified element to the end of this list
|
IntMapper<T> |
copy() |
T |
get(int index) |
java.util.List<T> |
getElements() |
int |
getIndex(T o) |
java.util.Iterator<T> |
iterator() |
int |
size() |
java.util.Spliterator<T> |
spliterator() |
public IntMapper()
public IntMapper(int initialCapacity)
public boolean add(T value)
value
- element to be appended to this list.public int size()
public T get(int index)
public int getIndex(T o)
public java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>
public java.util.Spliterator<T> spliterator()
spliterator
in interface java.lang.Iterable<T>
public IntMapper<T> copy()
copy
in interface Duplicatable
public java.util.List<T> getElements()
Copyright 2022 The Apache Software Foundation or its licensors, as applicable.