Record Class TravelLog.SystemSummary

java.lang.Object
java.lang.Record
mekhq.campaign.roleplay.TravelLog.SystemSummary
Record Components:
systemId - the system's id
systemName - its display name
firstVisit - the first date anything happened there
lastVisit - the last date anything happened there
visits - how many separate stays the main force had there
daysPresent - how many days the main force spent there
contracts - how many contracts were there
Enclosing class:
TravelLog

public static record TravelLog.SystemSummary(String systemId, String systemName, LocalDate firstVisit, LocalDate lastVisit, int visits, long daysPresent, int contracts) extends Record
One row of the by-system view.
  • Constructor Details

    • SystemSummary

      public SystemSummary(String systemId, String systemName, LocalDate firstVisit, LocalDate lastVisit, int visits, long daysPresent, int contracts)
      Creates an instance of a SystemSummary record class.
      Parameters:
      systemId - the value for the systemId record component
      systemName - the value for the systemName record component
      firstVisit - the value for the firstVisit record component
      lastVisit - the value for the lastVisit record component
      visits - the value for the visits record component
      daysPresent - the value for the daysPresent record component
      contracts - the value for the contracts record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • systemId

      public String systemId()
      Returns the value of the systemId record component.
      Returns:
      the value of the systemId record component
    • systemName

      public String systemName()
      Returns the value of the systemName record component.
      Returns:
      the value of the systemName record component
    • firstVisit

      public LocalDate firstVisit()
      Returns the value of the firstVisit record component.
      Returns:
      the value of the firstVisit record component
    • lastVisit

      public LocalDate lastVisit()
      Returns the value of the lastVisit record component.
      Returns:
      the value of the lastVisit record component
    • visits

      public int visits()
      Returns the value of the visits record component.
      Returns:
      the value of the visits record component
    • daysPresent

      public long daysPresent()
      Returns the value of the daysPresent record component.
      Returns:
      the value of the daysPresent record component
    • contracts

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