Class GeolocationFilter

    • Constructor Detail

      • GeolocationFilter

        public GeolocationFilter​(String name)
        Create a GeolocationFilter with the given name
        Parameters:
        name - the filter 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
        Specified by:
        getName in interface FieldFilter
        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
      • setName

        public GeolocationFilter setName​(String name)
        The field from your schema upon which to apply your filter
        Parameters:
        name - the field name
        Returns:
        this.
      • 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.