Record Class GeoInfo

java.lang.Object
java.lang.Record
com.djrapitops.plan.gathering.domain.GeoInfo
All Implemented Interfaces:
DateHolder, Serializable

public record GeoInfo(String geolocation, long date) extends Record implements DateHolder, Serializable
Data class that contains information about IP and Geolocation.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    GeoInfo(String geolocation, long date)
    Creates an instance of a GeoInfo record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the value of the date record component.
    boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the geolocation record component.
    int
    Returns a hash code value for this object.
    Returns a string representation of this record class.

    Methods inherited from class Object

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

    • GeoInfo

      public GeoInfo(String geolocation, long date)
      Creates an instance of a GeoInfo record class.
      Parameters:
      geolocation - the value for the geolocation record component
      date - the value for the date record component
  • Method Details

    • equals

      public 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 the compare method from their corresponding wrapper classes.
      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.
    • hashCode

      public 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
    • toString

      public 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
    • geolocation

      public String geolocation()
      Returns the value of the geolocation record component.
      Returns:
      the value of the geolocation record component
    • date

      public long date()
      Returns the value of the date record component.
      Specified by:
      date in interface DateHolder
      Returns:
      the value of the date record component