Class NumberRangeFilter

    • Constructor Detail

      • NumberRangeFilter

        public NumberRangeFilter​(String name,
                                 BigDecimal from,
                                 BigDecimal to)
        Create a NumberRangeFilter with the given name, start, and end
        Parameters:
        name - the filter name
        from - the filter start
        to - the filter end
      • NumberRangeFilter

        public NumberRangeFilter​(String name,
                                 Integer from,
                                 Integer to)
        Create a NumberRangeFilter with the given name, start, and end
        Parameters:
        name - the filter name
        from - the filter start
        to - the filter end
      • NumberRangeFilter

        public NumberRangeFilter​(String name,
                                 Long from,
                                 Long to)
        Create a NumberRangeFilter with the given name, start, and end
        Parameters:
        name - the filter name
        from - the filter start
        to - the filter end
      • NumberRangeFilter

        public NumberRangeFilter​(String name,
                                 Float from,
                                 Float to)
        Create a NumberRangeFilter with the given name, start, and end
        Parameters:
        name - the filter name
        from - the filter start
        to - the filter end
      • NumberRangeFilter

        public NumberRangeFilter​(String name,
                                 Double from,
                                 Double to)
        Create a NumberRangeFilter with the given name, start, and end
        Parameters:
        name - the filter name
        from - the filter start
        to - the filter end
      • NumberRangeFilter

        public NumberRangeFilter​(String name)
    • Method Detail

      • setRange

        public NumberRangeFilter setRange​(NumberRange range)
        Set the range
        Parameters:
        range - The range for this filter
        Returns:
        This filter
      • getRange

        public NumberRange 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
      • 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
      • setFrom

        public NumberRangeFilter 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 NumberRangeFilter setTo​(BigDecimal to)
        Exclusive upper bound of the range. Is required if from is not given.
        Parameters:
        to - the upper bound
        Returns:
        this.