Mappings.Builder<T extends Mappings>, Mappings.MappingsSupplier<T extends Mappings>
Constructor and Description |
---|
IdentityMappings(int size,
int mappedSize) |
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.
|
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
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