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>candidatesprivate Texact
-
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 booleanevaluate(T item)private booleanisAbbreviation(T item)private booleanisExact(T item)protected abstract booleanisExactNameMatch(java.lang.String value, T item)protected abstract booleanisPartialNameMatch(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:
evaluatein interfaceorg.apache.commons.collections4.Predicate<T>
-
isExact
private boolean isExact(T item)
-
isAbbreviation
private boolean isAbbreviation(T item)
-
-