Package org.gnome.gtk
Class StringSorter.Builder<B extends StringSorter.Builder<B>>
java.lang.Object
org.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theStringSorterobject.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
onChangedMethods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theStringSorterobject. 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:
buildin classSorter.Builder<B extends StringSorter.Builder<B>>- Returns:
- a new instance of
StringSorterwith the properties that were set in the Builder object.
-
setCollation
The collation method to use for sorting.The
GTK_COLLATION_NONEvalue 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 thecollationproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.10
-
setExpression
The expression to evaluate on item to get a string to compare with.- Parameters:
expression- the value for theexpressionproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setIgnoreCase
If sorting is case sensitive.- Parameters:
ignoreCase- the value for theignore-caseproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-