java.lang.Object
com.blazebit.persistence.deltaspike.data.Sort
All Implemented Interfaces:
Serializable, Iterable<Sort.Order>

public class Sort extends Object implements Iterable<Sort.Order>, Serializable
Immutable container for sorting information, heavily inspired by Spring Data's Sort.
Since:
1.2.0
Author:
Christian Beikov
See Also:
  • Constructor Details

    • Sort

      public Sort(Sort.Order... orders)
      Creates a new Sort with the given Sort.Orders.
      Parameters:
      orders - The orders to use for sorting
    • Sort

      public Sort(Collection<Sort.Order> orders)
      Creates a new Sort with the given Sort.Orders.
      Parameters:
      orders - The orders to use for sorting
    • Sort

      public Sort(String... paths)
      Creates a new Sort with the given paths and the Sort.Direction.ASC.
      Parameters:
      paths - The paths by which to sort
    • Sort

      public Sort(Sort.Direction direction, String... paths)
      Creates a new Sort with the given paths the given direction.
      Parameters:
      direction - The direction to use for sorting
      paths - The paths by which to sort
    • Sort

      public Sort(Sort.Direction direction, List<String> paths)
      Creates a new Sort with the given paths and given direction.
      Parameters:
      direction - The direction to use for sorting
      paths - The paths by which to sort
  • Method Details