public class UnsignedIntEncodedValue extends Object implements IntEncodedValue
EncodedValue.InitializerConfig
Modifier and Type | Field and Description |
---|---|
protected int |
bwdDataIndex |
protected int |
fwdDataIndex
There are multiple int values possible per edge.
|
Constructor and Description |
---|
UnsignedIntEncodedValue(String name,
int bits,
boolean storeTwoDirections)
This constructor reserves the specified number of bits in the underlying data structure or twice the amount if
storeTwoDirections is true.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getInt(boolean reverse,
IntsRef ref)
This method restores the integer value from the specified 'flags' taken from the storage.
|
int |
getMaxInt()
The int value this EncodedValue accepts for setInt without throwing an exception.
|
String |
getName()
This method returns the hierarchical name like vehicle.type of this EncodedValue
|
int |
getVersion()
The return value represents the state of this EncodedValue and it can be assumed that two JVMs return the
same version when the EncodedValue has the same state unlike the hashCode method.
|
int |
hashCode() |
int |
init(EncodedValue.InitializerConfig init)
This method sets the dataIndex and shift of this EncodedValue object and potentially changes the submitted init
object afterwards via calling next
|
boolean |
isStoreTwoDirections() |
void |
setInt(boolean reverse,
IntsRef ref,
int value)
This method stores the specified integer value in the specified IntsRef.
|
String |
toString() |
protected int fwdDataIndex
protected int bwdDataIndex
public UnsignedIntEncodedValue(String name, int bits, boolean storeTwoDirections)
storeTwoDirections
- if true this EncodedValue can store different values for the forward and backward
direction.public final int init(EncodedValue.InitializerConfig init)
EncodedValue
init
in interface EncodedValue
EncodedValue.InitializerConfig.next(int)
public final void setInt(boolean reverse, IntsRef ref, int value)
IntEncodedValue
setInt
in interface IntEncodedValue
public final int getInt(boolean reverse, IntsRef ref)
IntEncodedValue
getInt
in interface IntEncodedValue
public int getMaxInt()
IntEncodedValue
getMaxInt
in interface IntEncodedValue
public final boolean isStoreTwoDirections()
isStoreTwoDirections
in interface IntEncodedValue
public final String getName()
EncodedValue
getName
in interface EncodedValue
public int getVersion()
EncodedValue
getVersion
in interface EncodedValue
Copyright © 2012–2020. All rights reserved.