public class DoubleMapping
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private Mapping |
backward
The backward mappings.
|
private Mapping |
forward
The forward mappings.
|
Constructor and Description |
---|
DoubleMapping() |
Modifier and Type | Method and Description |
---|---|
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.
|
@NotNull private final Mapping backward
@NotNull private final Mapping forward
public void clear()
public int getDst(int src)
src
- the source indexpublic int getSrc(int dst)
dst
- the destination indexpublic void insert(int src, int dst)
src
- the source indexdst
- the destination indexpublic void remove(int src)
src
- the source index