public class ArrayNumberer<E extends Numberable> extends Object implements IterableNumberer<E>
| Modifier and Type | Field and Description |
|---|---|
protected BitSet |
freeNumbers |
protected int |
lastNumber |
protected E[] |
numberToObj |
| Constructor and Description |
|---|
ArrayNumberer() |
ArrayNumberer(E[] elements) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(E o)
Tells the numberer that a new object needs to be assigned a number.
|
long |
get(E o)
Should return the number that was assigned to object o that was previously passed as an argument to add().
|
E |
get(long number)
Should return the object that was assigned the number number.
|
Iterator<E> |
iterator()
Returns an iterator over all objects added to the numberer.
|
boolean |
remove(E o)
Removes the number for a given object.
|
int |
size()
Should return the number of objects that have been assigned numbers.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorprotected E extends Numberable[] numberToObj
protected int lastNumber
protected BitSet freeNumbers
public ArrayNumberer()
public ArrayNumberer(E[] elements)
public void add(E o)
Numbereradd in interface Numberer<E extends Numberable>public long get(E o)
Numbererget in interface Numberer<E extends Numberable>public E get(long number)
Numbererget in interface Numberer<E extends Numberable>public int size()
Numberersize in interface Numberer<E extends Numberable>public Iterator<E> iterator()
IterableNumbereriterator in interface Iterable<E extends Numberable>iterator in interface IterableNumberer<E extends Numberable>Copyright © 2020 Soot OSS. All rights reserved.