Class StringSorter.Builder<B extends StringSorter.Builder<B>>

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

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

      public B setCollation(Collation collation)

      The collation method to use for sorting.

      The GTK_COLLATION_NONE value is useful when the expression already returns collation keys, or strings that need to be compared byte-by-byte.

      The default value, GTK_COLLATION_UNICODE, compares strings according to the Unicode collation algorithm.

      Parameters:
      collation - the value for the collation property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.10
    • setExpression

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

      public B setIgnoreCase(boolean ignoreCase)
      If sorting is case sensitive.
      Parameters:
      ignoreCase - the value for the ignore-case property
      Returns:
      the Builder instance is returned, to allow method chaining