All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opentripplanner.netex.mapping.DirectionMapper Maven / Gradle / Ivy

There is a newer version: 2.6.0
Show newest version
package org.opentripplanner.netex.mapping;

import org.opentripplanner.transit.model.timetable.Direction;
import org.rutebanken.netex.model.DirectionTypeEnumeration;

class DirectionMapper {

  static Direction map(DirectionTypeEnumeration direction) {
    if (direction == null) {
      return Direction.UNKNOWN;
    }
    return switch (direction) {
      case INBOUND -> Direction.INBOUND;
      case OUTBOUND -> Direction.OUTBOUND;
      case CLOCKWISE -> Direction.CLOCKWISE;
      case ANTICLOCKWISE -> Direction.ANTICLOCKWISE;
    };
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy