Interface PropertyAccessor<T,R>


public interface PropertyAccessor<T,R>
  • Method Details

    • getProperty

      R getProperty(T item, String property)
      Get the value of an item's property/field
      Parameters:
      item - any object
      property - name of the property/field, could be a JSON pointer for example. May be null to represent the object itself.
      Returns:
      value of the property/field
    • getComparator

      default Comparator<Object> getComparator(String property)
      Get a comparator for the given property name
      Parameters:
      property - name of the property/field, could be a JSON pointer for example May be null to represent the object itself.
      Returns:
      comparator for property
    • getSortComparator

      default Comparator<T> getSortComparator(String property)
      Get a comparator that can be used to sort a list of items by a certain property
      Parameters:
      property - name of the property/field, could be a JSON pointer for example May be null to represent the object itself.
      Returns:
      comparator for sorting