Class StringEncodedValue

java.lang.Object
com.graphhopper.routing.ev.IntEncodedValueImpl
com.graphhopper.routing.ev.StringEncodedValue
All Implemented Interfaces:
EncodedValue, IntEncodedValue

public final class StringEncodedValue extends IntEncodedValueImpl
This class holds a List of up to maxValues encountered Strings and stores index+1 to indicate a string is set or 0 if no value is assigned
Author:
Peter Karich, Thomas Butz
  • Constructor Details

    • StringEncodedValue

      public StringEncodedValue(String name, int expectedValueCount)
    • StringEncodedValue

      public StringEncodedValue(String name, int expectedValueCount, boolean storeTwoDirections)
    • StringEncodedValue

      public StringEncodedValue(String name, int bits, List<String> values, boolean storeTwoDirections)
  • Method Details

    • setString

      public final void setString(boolean reverse, int edgeId, EdgeIntAccess edgeIntAccess, String value)
    • getString

      public final String getString(boolean reverse, int edgeId, EdgeIntAccess edgeIntAccess)
    • indexOf

      public int indexOf(String value)
      Parameters:
      value - the String to retrieve the index
      Returns:
      the non-zero index of the String or 0 if it couldn't be found
    • getValues

      public List<String> getValues()
      Returns:
      an unmodifiable List of the current values