Record Class Route

java.lang.Object
java.lang.Record
dev.hloth.zgztransport.Route
Record Components:
id - the route id; 0 on top ups made off board

public record Route(int id) extends Record
Route id of the operator's GTFS feed, byte 7 of a transaction.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Route
    The tram, printed as L1.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Route(int id)
    Creates an instance of a Route record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    id()
    Returns the value of the id record component.
    The name the operator prints: buses keep their number, 11 to 14 are Ci1 to Ci4, 111 to 117 are N1 to N7 and the tram is L1.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • TRAM

      public static final Route TRAM
      The tram, printed as L1.
  • Constructor Details

    • Route

      public Route(int id)
      Creates an instance of a Route record class.
      Parameters:
      id - the value for the id record component
  • Method Details

    • toString

      public String toString()
      The name the operator prints: buses keep their number, 11 to 14 are Ci1 to Ci4, 111 to 117 are N1 to N7 and the tram is L1.
      Specified by:
      toString in class Record
      Returns:
      the public name of this route
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public int id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component