Class DoubleMapping
- java.lang.Object
-
- com.realtime.crossfire.jxclient.util.DoubleMapping
-
public class DoubleMapping extends java.lang.ObjectMaintains a bidirectional mapping from a set of integers to the same range of integers.
-
-
Constructor Summary
Constructors Constructor Description DoubleMapping()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Removes all mappings.intgetDst(int src)Returns a mapping.intgetSrc(int dst)Returns a mapping.voidinsert(int src, int dst)Adds a mapping.voidremove(int src)Removes a mapping.
-
-
-
Method Detail
-
clear
public void clear()
Removes all mappings.
-
insert
public void insert(int src, int dst)Adds a mapping.- Parameters:
src- the source indexdst- the destination index
-
remove
public void remove(int src)
Removes a mapping.- Parameters:
src- the source index
-
getDst
public int getDst(int src)
Returns a mapping.- Parameters:
src- the source index- Returns:
- the destination index
-
getSrc
public int getSrc(int dst)
Returns a mapping.- Parameters:
dst- the destination index- Returns:
- the source index
-
-