Module com.github.rvesse.airline
Class AbstractAbbreviationFinder<T>
- java.lang.Object
-
- com.github.rvesse.airline.utils.predicates.AbstractAbbreviationFinder<T>
-
- All Implemented Interfaces:
org.apache.commons.collections4.Predicate<T>
- Direct Known Subclasses:
AbbreviatedCommandFinder
,AbbreviatedGroupFinder
,AbbreviatedOptionFinder
public abstract class AbstractAbbreviationFinder<T> extends java.lang.Object implements org.apache.commons.collections4.Predicate<T>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<T>
candidates
private T
exact
-
Constructor Summary
Constructors Constructor Description AbstractAbbreviationFinder(java.lang.String value, java.util.Collection<T> items)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
evaluate(T item)
private boolean
isAbbreviation(T item)
private boolean
isExact(T item)
protected abstract boolean
isExactNameMatch(java.lang.String value, T item)
protected abstract boolean
isPartialNameMatch(java.lang.String value, T item)
-
-
-
Constructor Detail
-
AbstractAbbreviationFinder
public AbstractAbbreviationFinder(java.lang.String value, java.util.Collection<T> items)
-
-
Method Detail
-
isExactNameMatch
protected abstract boolean isExactNameMatch(java.lang.String value, T item)
-
isPartialNameMatch
protected abstract boolean isPartialNameMatch(java.lang.String value, T item)
-
evaluate
public final boolean evaluate(T item)
- Specified by:
evaluate
in interfaceorg.apache.commons.collections4.Predicate<T>
-
isExact
private boolean isExact(T item)
-
isAbbreviation
private boolean isAbbreviation(T item)
-
-