public class IntMapper<T> extends java.lang.Object implements Duplicatable
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() |
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()
public IntMapper<T> copy()
copy
in interface Duplicatable
public java.util.List<T> getElements()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.