Package com.graphhopper.routing.ev
Interface IntEncodedValue
- All Superinterfaces:
EncodedValue
- All Known Implementing Classes:
DecimalEncodedValueImpl
,EnumEncodedValue
,IntEncodedValueImpl
,SimpleBooleanEncodedValue
,StringEncodedValue
This class defines how and where to store an unsigned integer. It is important to note that: 1. the range of the
integer is highly limited (unlike the Java 32bit integer values) so that the storable part of it fits into the
specified number of bits (maximum 32) and 2. the default value is always 0.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.graphhopper.routing.ev.EncodedValue
EncodedValue.InitializerConfig
-
Method Summary
Modifier and TypeMethodDescriptionint
getInt
(boolean reverse, int edgeId, EdgeIntAccess edgeIntAccess) This method restores the integer value from the specified 'flags' taken from the storage.int
Returns the maximum value set using this encoded value or the physical storage limit if no value has been set at all yet.int
The maximum int value this EncodedValue accepts for setInt without throwing an exception.int
The minimum int value this EncodedValue accepts for setInt without throwing an exception.boolean
void
setInt
(boolean reverse, int edgeId, EdgeIntAccess edgeIntAccess, int value) This method stores the specified integer value in the specified IntsRef.Methods inherited from interface com.graphhopper.routing.ev.EncodedValue
getName, init
-
Method Details
-
getInt
This method restores the integer value from the specified 'flags' taken from the storage. -
setInt
This method stores the specified integer value in the specified IntsRef. -
getMaxStorableInt
int getMaxStorableInt()The maximum int value this EncodedValue accepts for setInt without throwing an exception. -
getMinStorableInt
int getMinStorableInt()The minimum int value this EncodedValue accepts for setInt without throwing an exception. -
getMaxOrMaxStorableInt
int getMaxOrMaxStorableInt()Returns the maximum value set using this encoded value or the physical storage limit if no value has been set at all yet. Note that even when some values were set this is not equal to the global maximum across all values in the graph if values are set multiple times for the same edge and they are decreasing. However, the returned value will always be equal to or larger than the global maximum. -
isStoreTwoDirections
boolean isStoreTwoDirections()- Specified by:
isStoreTwoDirections
in interfaceEncodedValue
- Returns:
- true if this EncodedValue can store a different value for its reverse direction
-