Package com.iizix.geo

Class DeviceLocation

java.lang.Object
com.iizix.geo.DeviceLocation

public class DeviceLocation extends Object
Class holding the location of a device.
Author:
Christopher Mindus
  • Constructor Details

    • DeviceLocation

      public DeviceLocation(String device, GeoLocation location)
      Constructor.
      Parameters:
      device - The device UUID.
      location - The location.
      Throws:
      NullPointerException - If deviceId or location is null.
  • Method Details

    • getLocation

      public GeoLocation getLocation()
      Retrieves the location of the device.
      Returns:
      The location.
    • getDeviceUUID

      public String getDeviceUUID()
      Returns the device UUID if possible.
      Returns:
      The device UUID, "browser" or "unknown".
    • 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.
    • hashCode

      public int hashCode()
      Hash code.
      Overrides:
      hashCode in class Object
      Returns:
      Returns the hash code.
    • toString

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