Class GeolocationFilter

  • All Implemented Interfaces:
    Filter

    public class GeolocationFilter
    extends Object
    implements Filter
    Represents a Geolocation Filter on a search request
    • Constructor Detail

      • GeolocationFilter

        public GeolocationFilter​(String name)
    • Method Detail

      • getRange

        public GeolocationRange getRange()
        Get the range for this filter
        Returns:
        The range
      • hashCode

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

        public String getName()
        The field from your schema upon which to apply your filter
        Returns:
        the field name
      • getCenter

        public Geolocation getCenter()
        The mode of the distribution, specified as a latitude-longitude pair
        Returns:
        the center
      • getDistance

        public BigDecimal getDistance()
        A number representing the distance unit. Is required if from or to is not given.
        Returns:
        the distance
      • getUnit

        public Geolocation.Unit getUnit()
        The base unit of measurement
        Returns:
        the unit
      • getFrom

        public BigDecimal getFrom()
        Inclusive lower bound of the range. Is required if to is not given.
        Returns:
        the lower bound
      • getTo

        public BigDecimal getTo()
        Exclusive upper bound of the range. Is required if from is not given.
        Returns:
        the upper bound
      • setCenter

        public GeolocationFilter setCenter​(Geolocation center)
        The mode of the distribution, specified as a latitude-longitude pair
        Parameters:
        center - the center
        Returns:
        this.
      • setDistance

        public GeolocationFilter setDistance​(BigDecimal distance)
        A number representing the distance unit. Is required if from or to is not given.
        Parameters:
        distance - the distance
        Returns:
        this.
      • setFrom

        public GeolocationFilter setFrom​(BigDecimal from)
        Inclusive lower bound of the range. Is required if to is not given.
        Parameters:
        from - the lower bound
        Returns:
        this.
      • setTo

        public GeolocationFilter setTo​(BigDecimal to)
        Exclusive upper bound of the range. Is required if from is not given.
        Parameters:
        to - the upper bound
        Returns:
        this.