Package com.iizix.user.geo
Class Nearby
- java.lang.Object
- com.iizix.user.geo.Nearby
public class Nearby extends java.lang.Object
The nearby class with locations and distance.- Author:
- Christopher Mindus
Constructor Summary
Constructors Constructor Description Nearby(UserLocation location, double distance, boolean isElevationUsed)
Constructor.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Checks for equality.double
getDistance()
Gets the distance measured to the user in question.UserLocation
getUserLocationHistory()
Gets the user location.boolean
isElevationUsed()
Flag indicating elevation is taken into account (if present).java.lang.String
toString()
String representation of the class.
Constructor Detail
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:
java.lang.NullPointerException
- If userLocation is null.
Method Detail
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(java.lang.Object o)
Checks for equality.- Overrides:
equals
in classjava.lang.Object
- Parameters:
o
- The object to compare with.- Returns:
- When equals, false otherwise.
toString
public java.lang.String toString()
String representation of the class.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string with user and distance.