Class AgencyAndId

java.lang.Object
org.onebusaway.gtfs.model.AgencyAndId
All Implemented Interfaces:
Serializable, Comparable<AgencyAndId>

public class AgencyAndId extends Object implements Serializable, Comparable<AgencyAndId>
See Also:
  • Field Details

  • Constructor Details

    • AgencyAndId

      public AgencyAndId()
    • AgencyAndId

      public AgencyAndId(String agencyId, String id)
  • Method Details

    • getAgencyId

      public String getAgencyId()
    • setAgencyId

      public void setAgencyId(String agencyId)
    • getId

      public String getId()
    • setId

      public void setId(String id)
    • hasValues

      public boolean hasValues()
    • compareTo

      public int compareTo(AgencyAndId o)
      Specified by:
      compareTo in interface Comparable<AgencyAndId>
    • convertFromString

      public static AgencyAndId convertFromString(String value, char separator)
      Given an id of the form "agencyId_entityId", parses into a AgencyAndId id object.
      Parameters:
      value - id of the form "agencyId_entityId"
      Returns:
      an id object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • convertFromString

      public static AgencyAndId convertFromString(String value) throws IllegalArgumentException
      Given an id of the form "agencyId_entityId", parses into a AgencyAndId id object.
      Parameters:
      value - id of the form "agencyId_entityId"
      Returns:
      an id object
      Throws:
      IllegalArgumentException - if the id cannot be parsed
    • convertToString

      public static String convertToString(AgencyAndId aid)
      Given an AgencyAndId object, creates a string representation of the form "agencyId_entityId"
      Parameters:
      aid - an id object
      Returns:
      a string representation of the form "agencyId_entityId"