Package com.graphhopper.util.details
Class AbstractPathDetailsBuilder
java.lang.Object
com.graphhopper.util.details.AbstractPathDetailsBuilder
- All Implemented Interfaces:
PathDetailsBuilder
- Direct Known Subclasses:
AverageSpeedDetails
,BooleanDetails
,ConstantDetailsBuilder
,DecimalDetails
,DistanceDetails
,EdgeIdDetails
,EdgeKeyDetails
,EnumDetails
,IntDetails
,IntersectionDetails
,KVStringDetails
,StringDetails
,TimeDetails
,WeightDetails
Builds a PathDetail list, from values and intervals of a Path.
- Author:
- Robin Boldt
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
void
endInterval
(int lastIndex) Ending intervals multiple times is safe, we only write the interval if it was open and not empty.protected abstract Object
The value of the Path at this moment, that should be stored in the PathDetail when calling startIntervalgetName()
void
startInterval
(int firstIndex) It is only possible to open one interval at a time.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.graphhopper.util.details.PathDetailsBuilder
isEdgeDifferentToLastEdge
-
Constructor Details
-
AbstractPathDetailsBuilder
-
-
Method Details
-
getCurrentValue
The value of the Path at this moment, that should be stored in the PathDetail when calling startInterval -
startInterval
public void startInterval(int firstIndex) It is only possible to open one interval at a time. CallingstartInterval
when the interval is already open results in an Exception.- Specified by:
startInterval
in interfacePathDetailsBuilder
- Parameters:
firstIndex
- the index the PathDetail starts
-
endInterval
public void endInterval(int lastIndex) Ending intervals multiple times is safe, we only write the interval if it was open and not empty. Writes the interval to the pathDetails- Specified by:
endInterval
in interfacePathDetailsBuilder
- Parameters:
lastIndex
- the index the PathDetail ends
-
build
- Specified by:
build
in interfacePathDetailsBuilder
-
getName
- Specified by:
getName
in interfacePathDetailsBuilder
-
toString
-