Mappings.Builder<T extends Mappings>, Mappings.MappingsSupplier<T extends Mappings>
Modifier | Constructor and Description |
---|---|
protected |
Int2IntMapMappings(it.unimi.dsi.fastutil.ints.Int2IntMap mappings,
int mappedIds) |
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.
|
Mappings |
inverse()
Mappings with keys and values swapped.
|
int |
mappedSize()
Returns the amount of new ids total, even if it does not have a direct mapping.
|
static Int2IntMapMappings |
of() |
static Int2IntMapMappings |
of(it.unimi.dsi.fastutil.ints.Int2IntMap mappings,
int mappedIds) |
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
builder, contains, getNewIdOrDefault
protected Int2IntMapMappings(it.unimi.dsi.fastutil.ints.Int2IntMap mappings, int mappedIds)
public static Int2IntMapMappings of(it.unimi.dsi.fastutil.ints.Int2IntMap mappings, int mappedIds)
public static Int2IntMapMappings of()
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