public class Int2IntMapBiMappings extends java.lang.Object implements BiMappings
Mappings.Builder<T extends Mappings>, Mappings.MappingsSupplier<T extends Mappings>
Modifier | Constructor and Description |
---|---|
protected |
Int2IntMapBiMappings(Int2IntBiMap mappings) |
Modifier and Type | Method and Description |
---|---|
int |
getNewId(int id)
Returns the mapped id from the given id, or -1 if invalid/out of bounds.
|
BiMappings |
inverse()
Returns the inverse of the bimappings.
|
int |
mappedSize()
Returns the amount of new ids total, even if it does not have a direct mapping.
|
static Int2IntMapBiMappings |
of(Int2IntBiMap mappings) |
void |
setNewId(int id,
int mappedId)
Manually maps a specific id.
|
int |
size()
Returns amount of unmapped entries, being the size of the mapping.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
of, of
builder, contains, getNewIdOrDefault
protected Int2IntMapBiMappings(Int2IntBiMap mappings)
public static Int2IntMapBiMappings of(Int2IntBiMap mappings)
public int getNewId(int id)
Mappings
public void setNewId(int id, int mappedId)
Mappings
public int size()
Mappings
public int mappedSize()
Mappings
mappedSize
in interface Mappings
public BiMappings inverse()
BiMappings
inverse
in interface BiMappings
inverse
in interface Mappings