class Traversal implements Serializable {

    public double getAccelerationAtTime(double time) {
        if (DoubleMath.fuzzyEquals(time, totalDuration, totalDuration * ROUNDING_ERROR_FRACTION)) {
            TraversalSection lastSection = Iterables.getLast(sections);
            return lastSection.getAccelerationAtTime(lastSection.getDuration());
        }
        if (time > totalDuration) {
            return 0;
        }

        if (time < 0) {
            throw new TraversalCalculationException("Negative time provided");
        }

        return SegmentGraphUtilities.getValueAt(
                sections,
                TraversalSection::getDuration,
                TraversalSection::getAccelerationAtTime,
                time);
    }

    public  Traversal(ImmutableList<TraversalSection> sections);

}