Package org.onebusaway.gtfs.model
Class AgencyAndId
java.lang.Object
org.onebusaway.gtfs.model.AgencyAndId
- All Implemented Interfaces:
Serializable,Comparable<AgencyAndId>
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintstatic AgencyAndIdconvertFromString(String value) Given an id of the form "agencyId_entityId", parses into aAgencyAndIdid object.static AgencyAndIdconvertFromString(String value, char separator) Given an id of the form "agencyId_entityId", parses into aAgencyAndIdid object.static StringGiven anAgencyAndIdobject, creates a string representation of the form "agencyId_entityId"booleangetId()inthashCode()booleanvoidsetAgencyId(String agencyId) voidtoString()
-
Field Details
-
ID_SEPARATOR
public static final char ID_SEPARATOR- See Also:
-
-
Constructor Details
-
AgencyAndId
public AgencyAndId() -
AgencyAndId
-
-
Method Details
-
getAgencyId
-
setAgencyId
-
getId
-
setId
-
hasValues
public boolean hasValues() -
compareTo
- Specified by:
compareToin interfaceComparable<AgencyAndId>
-
convertFromString
Given an id of the form "agencyId_entityId", parses into aAgencyAndIdid object.- Parameters:
value- id of the form "agencyId_entityId"- Returns:
- an id object
-
hashCode
public int hashCode() -
equals
-
toString
-
convertFromString
Given an id of the form "agencyId_entityId", parses into aAgencyAndIdid object.- Parameters:
value- id of the form "agencyId_entityId"- Returns:
- an id object
- Throws:
IllegalArgumentException- if the id cannot be parsed
-
convertToString
Given anAgencyAndIdobject, creates a string representation of the form "agencyId_entityId"- Parameters:
aid- an id object- Returns:
- a string representation of the form "agencyId_entityId"
-