Crossfire JXClient, Trunk  R20561
com.realtime.crossfire.jxclient.util.DoubleMapping Class Reference

Maintains a bidirectional mapping from a set of integers to the same range of integers. More...

+ Collaboration diagram for com.realtime.crossfire.jxclient.util.DoubleMapping:

Public Member Functions

void clear ()
 Removes all mappings. More...
 
int getDst (final int src)
 Returns a mapping. More...
 
int getSrc (final int dst)
 Returns a mapping. More...
 
void insert (final int src, final int dst)
 Adds a mapping. More...
 
void remove (final int src)
 Removes a mapping. More...
 

Private Attributes

final Mapping backward = new Mapping()
 The backward mappings. More...
 
final Mapping forward = new Mapping()
 The forward mappings. More...
 

Detailed Description

Maintains a bidirectional mapping from a set of integers to the same range of integers.

Author
Andreas Kirschbaum

Definition at line 31 of file DoubleMapping.java.

Member Function Documentation

◆ clear()

void com.realtime.crossfire.jxclient.util.DoubleMapping.clear ( )

Removes all mappings.

Definition at line 48 of file DoubleMapping.java.

References com.realtime.crossfire.jxclient.util.Mapping.clear().

Referenced by com.realtime.crossfire.jxclient.items.InventoryView.setCurrentPlayerTag().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDst()

int com.realtime.crossfire.jxclient.util.DoubleMapping.getDst ( final int  src)

Returns a mapping.

Parameters
srcthe source index
Returns
the destination index

Definition at line 78 of file DoubleMapping.java.

References com.realtime.crossfire.jxclient.util.Mapping.get().

+ Here is the call graph for this function:

◆ getSrc()

int com.realtime.crossfire.jxclient.util.DoubleMapping.getSrc ( final int  dst)

Returns a mapping.

Parameters
dstthe destination index
Returns
the source index

Definition at line 87 of file DoubleMapping.java.

References com.realtime.crossfire.jxclient.util.Mapping.get().

+ Here is the call graph for this function:

◆ insert()

void com.realtime.crossfire.jxclient.util.DoubleMapping.insert ( final int  src,
final int  dst 
)

Adds a mapping.

Parameters
srcthe source index
dstthe destination index

Definition at line 58 of file DoubleMapping.java.

References com.realtime.crossfire.jxclient.util.Mapping.insert().

Referenced by com.realtime.crossfire.jxclient.util.DoubleMappingTest.test1().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ remove()

void com.realtime.crossfire.jxclient.util.DoubleMapping.remove ( final int  src)

Removes a mapping.

Parameters
srcthe source index

Definition at line 67 of file DoubleMapping.java.

References com.realtime.crossfire.jxclient.util.Mapping.get(), and com.realtime.crossfire.jxclient.util.Mapping.remove().

Referenced by com.realtime.crossfire.jxclient.util.DoubleMappingTest.test1().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ backward

final Mapping com.realtime.crossfire.jxclient.util.DoubleMapping.backward = new Mapping()
private

The backward mappings.

Maps destination index to source index.

Definition at line 43 of file DoubleMapping.java.

◆ forward

final Mapping com.realtime.crossfire.jxclient.util.DoubleMapping.forward = new Mapping()
private

The forward mappings.

Maps source index to destination index.

Definition at line 37 of file DoubleMapping.java.


The documentation for this class was generated from the following file: