org.gnome.gtk

## Interface EntryCompletion.Match

- Enclosing class:
    EntryCompletion

      public static interface EntryCompletion.Match

  The callback invoked when a EntryCompletion wants to ask if a given row in the TreeModel should be in the completion list. Generally, when you will receive the callback you will reach into the source's `model` and query a column by which you will determine whether or not to include this row. It allows you to a create a more complex completion behavior into the `EntryCompletion.Match` callback. The behavior of a default EntryCompletion can be written like that:

       final DataColumnString column;
       final EntryCompletion completion;

       ...

       completion.setMatchCallback(new EntryCompletion.Match() {
           public boolean onMatch(EntryCompletion source, String key, TreeIter iter) {
               final TreeModel model;
               final String text;

               model = source.getModel();
               text = model.getValue(iter, column);

               return text.startsWith(key);
           }
       });

  If you are researching the GTK API documentation, see `(*GtkEntryCompletionMatchFunc)`. Creating and invoking this "match" signal is how java-gnome has implemented the function pointer expected by `gtk_entry_completion_set_match_func()`.

  Since:
    4.0.12

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `onMatch(EntryCompletion source, String key, TreeIter iter)` Tell if a row should be in the completion list or not.

- - ### Method Detail

    - #### onMatch

          boolean onMatch(EntryCompletion source,
                        String key,
                        TreeIter iter)

      Tell if a row should be in the completion list or not. Return `true` for the row to be included in the list, or `false` for the row to be excluded.
      Since:
        4.0.12