Package org.gnome.gtk
Class StringSorter.Builder<B extends StringSorter.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gtk.Sorter.Builder<B>
org.gnome.gtk.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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theStringSorter
object.setCollation
(Collation collation) The collation method to use for sorting.setExpression
(Expression expression) The expression to evaluate on item to get a string to compare with.setIgnoreCase
(boolean ignoreCase) If sorting is case sensitive.Methods inherited from class org.gnome.gtk.Sorter.Builder
onChanged
Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theStringSorter
object. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])
to create a new GObject instance, which is then cast toStringSorter
.- Overrides:
build
in classSorter.Builder<B extends StringSorter.Builder<B>>
- Returns:
- a new instance of
StringSorter
with the properties that were set in the Builder object.
-
setCollation
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 thecollation
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setExpression
The expression to evaluate on item to get a string to compare with.- Parameters:
expression
- the value for theexpression
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setIgnoreCase
If sorting is case sensitive.- Parameters:
ignoreCase
- the value for theignore-case
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-