Class Nearby

java.lang.Object
com.iizix.user.geo.Nearby

public class Nearby extends Object
The nearby class with locations and distance.
Author:
Christopher Mindus
  • Constructor Details

    • Nearby

      public Nearby(UserLocation location, double distance, boolean isElevationUsed)
      Constructor.
      Parameters:
      location - The user location.
      distance - The distance in meters.
      isElevationUsed - Flag indicating elevation is taken into account (if present).
      Throws:
      NullPointerException - If userLocation is null.
  • Method Details

    • getUserLocationHistory

      public UserLocation getUserLocationHistory()
      Gets the user location.
      Returns:
      The user location instance.
    • getDistance

      public double getDistance()
      Gets the distance measured to the user in question.
      Returns:
      A distance in meters, perhaps taking into account the elevation.
    • isElevationUsed

      public boolean isElevationUsed()
      Flag indicating elevation is taken into account (if present).
    • equals

      public boolean equals(Object o)
      Checks for equality.
      Overrides:
      equals in class Object
      Parameters:
      o - The object to compare with.
      Returns:
      When equals, false otherwise.
    • toString

      public String toString()
      String representation of the class.
      Overrides:
      toString in class Object
      Returns:
      A string with user and distance.