Verified Owner
Top Description Constructors Methods
org.jabref.gui.autocompleter

public abstract Class SuggestionProvider<T>

extends Object
Class Inheritance
Known Direct Subclasses
org.jabref.gui.autocompleter.BibEntrySuggestionProvider, org.jabref.gui.autocompleter.EmptySuggestionProvider, org.jabref.gui.autocompleter.PersonNameSuggestionProvider, org.jabref.gui.autocompleter.StringSuggestionProvider
Type Parameters
<T>
Type of suggestions
Imports
java.util.Collection, .Comparator, .List, java.util.stream.Collectors, .Stream, com.google.common.base.Equivalence, org.controlsfx.control.textfield.AutoCompletionBinding.ISuggestionRequest

This is a simple implementation of a generic suggestion provider callback.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected abstract Comparator<T>
getComparator()

Get the comparator to order the suggestions

protected abstract Equivalence<T>
public List<T>
public abstract Stream<T>
protected abstract boolean
isMatch(T candidate, AutoCompletionBinding.ISuggestionRequest request)

Check the given candidate is a match (ie a valid suggestion)

public final Collection<T>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SuggestionProviderback to summary
public SuggestionProvider()

Method Detail

getComparatorback to summary
protected abstract Comparator<T> getComparator()

Get the comparator to order the suggestions

getEquivalenceback to summary
protected abstract Equivalence<T> getEquivalence()
getPossibleSuggestionsback to summary
public List<T> getPossibleSuggestions()
getSourceback to summary
public abstract Stream<T> getSource()
isMatchback to summary
protected abstract boolean isMatch(T candidate, AutoCompletionBinding.ISuggestionRequest request)

Check the given candidate is a match (ie a valid suggestion)

provideSuggestionsback to summary
public final Collection<T> provideSuggestions(AutoCompletionBinding.ISuggestionRequest request)