Class SortArgs

java.lang.Object
org.apache.juneau.objecttools.SortArgs

public class SortArgs extends Object
  • Constructor Details

    • SortArgs

      public SortArgs(String sortArgs)
      Constructor.
      Parameters:
      sortArgs - Comma-delimited list of sort arguments.
      Values are of the following forms:
      • "column" - Sort column ascending.
      • "column+" - Sort column ascending.
      • "column-" - Sort column descending.
    • SortArgs

      public SortArgs(Collection<String> sortArgs)
      Constructor.
      Parameters:
      sortArgs - Sort arguments.
      Values are of the following forms:
      • "column" - Sort column ascending.
      • "column+" - Sort column ascending.
      • "column-" - Sort column descending.
  • Method Details

    • create

      public static SortArgs create(String args)
      Static creator.
      Parameters:
      args - Comma-delimited list of sort arguments.
      Values are of the following forms:
      • "column" - Sort column ascending.
      • "column+" - Sort column ascending.
      • "column-" - Sort column descending.
      Returns:
      A new SortArgs object.
    • create

      public static SortArgs create(List<String> args)
      Static creator.
      Parameters:
      args - Sort arguments.
      Values are of the following forms:
      • "column" - Sort column ascending.
      • "column+" - Sort column ascending.
      • "column-" - Sort column descending.
      Returns:
      A new SortArgs object.
    • getSort

      The sort columns.

      The sort columns are key/value pairs consisting of column-names and direction flags (false = ascending, true = descending).

      Returns:
      An unmodifiable ordered map of sort columns and directions.