Package com.graphhopper.routing.util
Class EncodingManager
java.lang.Object
com.graphhopper.routing.util.EncodingManager
- All Implemented Interfaces:
EncodedValueLookup
Manager class to register encoder, assign their flag values and check objects with all encoders
during parsing. Create one via:
EncodingManager.start(4).add(new CarFlagEncoder()).build();
- Author:
- Peter Karich, Nop
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionEncodingManager
(int bytesForFlags, int intsForTurnCostFlags, LinkedHashMap<String, EncodedValue> encodedValueMap, LinkedHashMap<String, EncodedValue> turnEncodedValueMap) -
Method Summary
Modifier and TypeMethodDescriptionstatic EncodingManager
fromProperties
(StorableProperties properties) int
<T extends EncodedValue>
TgetEncodedValue
(String key, Class<T> encodedValueType) <T extends Enum<?>>
EnumEncodedValue<T>getEnumEncodedValue
(String key, Class<T> type) getIntEncodedValue
(String key) static String
<T extends EncodedValue>
TgetTurnEncodedValue
(String key, Class<T> encodedValueType) boolean
hasEncodedValue
(String key) boolean
boolean
static void
putEncodingManagerIntoProperties
(EncodingManager encodingManager, StorableProperties properties) static EncodingManager.Builder
start()
Starts the build process of an EncodingManagertoString()
-
Constructor Details
-
EncodingManager
public EncodingManager(int bytesForFlags, int intsForTurnCostFlags, LinkedHashMap<String, EncodedValue> encodedValueMap, LinkedHashMap<String, EncodedValue> turnEncodedValueMap)
-
-
Method Details
-
putEncodingManagerIntoProperties
public static void putEncodingManagerIntoProperties(EncodingManager encodingManager, StorableProperties properties) -
fromProperties
-
start
Starts the build process of an EncodingManager -
getBytesForFlags
public int getBytesForFlags() -
hasEncodedValue
- Specified by:
hasEncodedValue
in interfaceEncodedValueLookup
-
hasTurnEncodedValue
-
getVehicles
- Returns:
- list of all prefixes of xy_access and xy_average_speed encoded values.
-
toEncodedValuesAsString
-
toString
-
createEdgeFlags
-
createRelationFlags
-
needsTurnCostsSupport
public boolean needsTurnCostsSupport() -
getEncodedValues
- Specified by:
getEncodedValues
in interfaceEncodedValueLookup
-
getBooleanEncodedValue
- Specified by:
getBooleanEncodedValue
in interfaceEncodedValueLookup
-
getIntEncodedValue
- Specified by:
getIntEncodedValue
in interfaceEncodedValueLookup
-
getDecimalEncodedValue
- Specified by:
getDecimalEncodedValue
in interfaceEncodedValueLookup
-
getEnumEncodedValue
- Specified by:
getEnumEncodedValue
in interfaceEncodedValueLookup
-
getStringEncodedValue
- Specified by:
getStringEncodedValue
in interfaceEncodedValueLookup
-
getEncodedValue
- Specified by:
getEncodedValue
in interfaceEncodedValueLookup
-
getTurnEncodedValues
-
getTurnDecimalEncodedValue
-
getTurnBooleanEncodedValue
-
getTurnEncodedValue
-
getKey
-