java.lang.Objectcom.realtime.crossfire.jxclient.util.DoubleMapping
public class DoubleMapping
Maintains a bidirectional mapping from a set of integers to the same range of integers.
| Field Summary | |
|---|---|
private Mapping |
backward
The backward mappings. |
private Mapping |
forward
The forward mappings. |
| Constructor Summary | |
|---|---|
DoubleMapping()
|
|
| Method Summary | |
|---|---|
void |
clear()
Removes all mappings. |
int |
getDst(int src)
Returns a mapping. |
int |
getSrc(int dst)
Returns a mapping. |
void |
insert(int src,
int dst)
Adds a mapping. |
void |
remove(int src)
Removes a mapping. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@NotNull private final Mapping backward
@NotNull private final Mapping forward
| Constructor Detail |
|---|
public DoubleMapping()
| Method Detail |
|---|
public void clear()
public int getDst(int src)
src - the source index
public int getSrc(int dst)
dst - the destination index
public void insert(int src,
int dst)
src - the source indexdst - the destination indexpublic void remove(int src)
src - the source index