Class FieldComparators


  • public class FieldComparators
    extends Object
    An internal holder of the comparators for fields described by their path without element index.

    Examples: name.first or names.first but not names[1].first or names.[1].first

    • Constructor Detail

      • FieldComparators

        public FieldComparators()
    • Method Detail

      • registerComparator

        public void registerComparator​(String fieldLocation,
                                       Comparator<?> comparator)
        Puts the comparator for the given clazz.
        Parameters:
        fieldLocation - the FieldLocation where to apply the comparator
        comparator - the comparator it self
      • isEmpty

        public boolean isEmpty()
        Returns:
        true is there are registered comparators, false otherwise
      • hashCode

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

        public boolean hasComparatorForField​(String fieldLocation)
      • getComparatorForField

        public Comparator<?> getComparatorForField​(String fieldLocation)