public class MutableMapping<T> extends Object implements OrdinalSetMapping<T>, Serializable
Modifier | Constructor and Description |
---|---|
protected |
MutableMapping() |
|
MutableMapping(Object[] array) |
Modifier and Type | Method and Description |
---|---|
int |
add(T o)
Add an object to the set of mapped objects.
|
void |
deleteMappedObject(T n) |
int |
getMappedIndex(Object o) |
T |
getMappedObject(int n) |
int |
getMaximumIndex() |
Collection<T> |
getObjects() |
int |
getSize() |
boolean |
hasMappedIndex(T o) |
Iterator<T> |
iterator() |
static <T> MutableMapping<T> |
make() |
OrdinalSet<T> |
makeSingleton(int i) |
void |
put(int i,
T o)
Add an object to the set of mapped objects at index i.
|
void |
replace(T a,
T b)
Replace a in this mapping with b.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public MutableMapping(Object[] array)
IllegalArgumentException
- if array is nullprotected MutableMapping()
public static <T> MutableMapping<T> make()
public T getMappedObject(int n)
getMappedObject
in interface OrdinalSetMapping<T>
public int getMappedIndex(Object o)
getMappedIndex
in interface OrdinalSetMapping<T>
public boolean hasMappedIndex(T o)
hasMappedIndex
in interface OrdinalSetMapping<T>
public int add(T o)
add
in interface OrdinalSetMapping<T>
public OrdinalSet<T> makeSingleton(int i)
public void deleteMappedObject(T n)
n
- public Collection<T> getObjects()
public void replace(T a, T b) throws IllegalArgumentException
IllegalArgumentException
public void put(int i, T o)
public int getMaximumIndex()
getMaximumIndex
in interface OrdinalSetMapping<T>
public int getSize()
getSize
in interface OrdinalSetMapping<T>