Class NumericSorter.Builder<B extends NumericSorter.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
NumericSorter

public static class NumericSorter.Builder<B extends NumericSorter.Builder<B>> extends Sorter.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public NumericSorter build()
      Finish building the NumericSorter object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to NumericSorter.
      Overrides:
      build in class Sorter.Builder<B extends NumericSorter.Builder<B>>
      Returns:
      a new instance of NumericSorter with the properties that were set in the Builder object.
    • setExpression

      public B setExpression(Expression expression)
      The expression to evaluate on items to get a number to compare with.
      Parameters:
      expression - the value for the expression property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSortOrder

      public B setSortOrder(SortType sortOrder)
      Whether the sorter will sort smaller numbers first.
      Parameters:
      sortOrder - the value for the sort-order property
      Returns:
      the Builder instance is returned, to allow method chaining