public class SimpleIntEncodedValue 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 |
|---|
SimpleIntEncodedValue(String name,
int bits) |
SimpleIntEncodedValue(String name,
int bits,
boolean storeBothDirections)
This constructor reserves the specified number of bits in the underlying data structure or twice the amount if
store2DirectedValues 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.
|
String |
getName()
This method returns the hierarchical name like vehicle.type of this EncodedValue
|
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
|
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 SimpleIntEncodedValue(String name, int bits)
public SimpleIntEncodedValue(String name, int bits, boolean storeBothDirections)
storeBothDirections - if true the encoded value can be different for the forward and backward
direction of an edge.public final int init(EncodedValue.InitializerConfig init)
EncodedValueinit in interface EncodedValueEncodedValue.InitializerConfig.next(int)public final void setInt(boolean reverse,
IntsRef ref,
int value)
IntEncodedValuesetInt in interface IntEncodedValuepublic final int getInt(boolean reverse,
IntsRef ref)
IntEncodedValuegetInt in interface IntEncodedValuepublic final String getName()
EncodedValuegetName in interface EncodedValueCopyright © 2012–2019. All rights reserved.