Class FileFilter.Builder<B extends FileFilter.Builder<B>>

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

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

      public B setMimeTypes(String[] mimeTypes)
      The MIME types that this filter matches.
      Parameters:
      mimeTypes - the value for the mime-types property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.10
    • setName

      public B setName(String name)

      The human-readable name of the filter.

      This is the string that will be displayed in the user interface if there is a selectable list of filters.

      Parameters:
      name - the value for the name property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setPatterns

      public B setPatterns(String[] patterns)
      The patterns that this filter matches.
      Parameters:
      patterns - the value for the patterns property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.10
    • setSuffixes

      public B setSuffixes(String[] suffixes)
      The suffixes that this filter matches.
      Parameters:
      suffixes - the value for the suffixes property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.10