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.5.0
Show newest version
package org.opentripplanner.netex.mapping;

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

class DirectionMapper {
  static Direction map(DirectionTypeEnumeration direction) {
    if (direction == null) { return Direction.UNKNOWN; }
    switch (direction) {
      case INBOUND:
        return Direction.INBOUND;
      case OUTBOUND:
        return Direction.OUTBOUND;
      case CLOCKWISE:
        return Direction.CLOCKWISE;
      case ANTICLOCKWISE:
        return Direction.ANTICLOCKWISE;
      default:
        return Direction.UNKNOWN;
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy