Module lettuce.core

Class GeoWithin<V>

java.lang.Object
io.lettuce.core.GeoWithin<V>
Type Parameters:
V - Value type.

public class GeoWithin<V>
extends Object
Geo element within a certain radius. Contains:
  • the member
  • the distance from the reference point (if requested)
  • the geohash (if requested)
  • the coordinates (if requested)
Author:
Mark Paluch
  • Constructor Details

    • GeoWithin

      public GeoWithin​(V member, Double distance, Long geohash, GeoCoordinates coordinates)
      Creates a new GeoWithin.
      Parameters:
      member - the member.
      distance - the distance, may be null.
      geohash - the geohash, may be null.
      coordinates - the coordinates, may be null.
  • Method Details

    • getMember

      public V getMember()
      Returns:
      the member within the Geo set.
    • getDistance

      public Double getDistance()
      Returns:
      distance if requested otherwise null.
    • getGeohash

      public Long getGeohash()
      Returns:
      geohash if requested otherwise null.
    • getCoordinates

      public GeoCoordinates getCoordinates()
      Returns:
      coordinates if requested otherwise null.
    • toValue

      public GeoValue<V> toValue()
      Returns:
      a GeoValue if coordinates are set.
      Since:
      6.1
    • equals

      public boolean equals​(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object