Class ComparatorBuilder.DefaultComparatorBuilder

    • Constructor Detail

      • DefaultComparatorBuilder

        public DefaultComparatorBuilder()
    • Method Detail

      • add

        public ComparatorBuilder add​(String field,
                                     ValueExtractor valueExtractor,
                                     Comparator<?> comparator)
        Description copied from interface: ComparatorBuilder
        Adds the given comparator for the given field name or path to this builder. A custom value extractor can be specified.
        Specified by:
        add in interface ComparatorBuilder
        Parameters:
        field - the field name or path (can be null)
        valueExtractor - the value extractor (can be null)
        comparator - the comparator (can be null - then no comparator is added)
        Returns:
        the comparator builder
      • add

        public ComparatorBuilder add​(String field,
                                     boolean asc,
                                     boolean ignoreCase,
                                     boolean nullIsFirst,
                                     ValueExtractor valueExtractor)
        Description copied from interface: ComparatorBuilder
        Creates and adds a value comparator for the given field name or path to this builder. A custom value extractor can be specified.
        Specified by:
        add in interface ComparatorBuilder
        Parameters:
        field - the field name or path (can be null)
        asc - true for an ascending order, false for a descending order
        ignoreCase - true for a case insensitive order, false for a case sensitive order
        nullIsFirst - specifies the order of null values
        valueExtractor - the value extractor
        Returns:
        the comparator builder