Package com.nnamo.models
Class RouteDirection
java.lang.Object
com.nnamo.models.RouteDirection
Represents a directioned route.
It is used to differentiate routes based on their direction, for instance
when visualizing the routes on the map
Contains route ID, agency, names, type, direction, and direction name.
-
Constructor Summary
ConstructorsConstructorDescriptionRouteDirection
(String id, AgencyModel agency, String longName, String shortName, RouteType routeType, Direction direction, String directionName) Constructs a RouteDirection with all required fields. -
Method Summary
Modifier and TypeMethodDescriptionGets the agency associated with the route.Gets the direction of the route.Gets the direction name.getId()
Gets the route ID.Gets the long name of the route.Gets the short name of the route.getType()
Gets the route type.void
setDirection
(Direction direction) Sets the direction of the route.void
setDirectionName
(String directionName) Sets the direction name.
-
Constructor Details
-
RouteDirection
public RouteDirection(String id, AgencyModel agency, String longName, String shortName, RouteType routeType, Direction direction, String directionName) Constructs a RouteDirection with all required fields.- Parameters:
id
- the route IDagency
- the agencylongName
- the long name of the routeshortName
- the short name of the routerouteType
- the route typedirection
- the directiondirectionName
- the direction name
-
-
Method Details
-
getId
Gets the route ID.- Returns:
- the route ID
-
getLongName
Gets the long name of the route.- Returns:
- the long name
-
getShortName
Gets the short name of the route.- Returns:
- the short name
-
getAgency
Gets the agency associated with the route.- Returns:
- the agency
-
getType
Gets the route type.- Returns:
- the route type
-
getDirection
Gets the direction of the route.- Returns:
- the direction
-
getDirectionName
Gets the direction name.- Returns:
- the direction name
-
setDirection
Sets the direction of the route.- Parameters:
direction
- the direction to set
-
setDirectionName
Sets the direction name.- Parameters:
directionName
- the direction name to set
-