Mappings.Builder<T extends Mappings>, Mappings.MappingsSupplier<T extends Mappings>
Modifier | Constructor and Description |
---|---|
protected |
IntArrayMappings(int[] mappings,
int mappedIds) |
Modifier and Type | Method and Description |
---|---|
static Mappings.Builder<IntArrayMappings> |
builder()
Deprecated.
|
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 IntArrayMappings |
of(int[] mappings,
int mappedIds) |
int[] |
raw() |
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 static IntArrayMappings of(int[] mappings, int mappedIds)
@Deprecated public static Mappings.Builder<IntArrayMappings> builder()
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 Mappings inverse()
Mappings
public int[] raw()