X - the type of sequences that have prefixes needing substitutingpublic class PrefixSubstituter<X extends java.lang.Comparable<X>>
extends java.lang.Object
| Constructor and Description | 
|---|
PrefixSubstituter(java.util.function.BiPredicate<X,X> isPrefixOf,
                 java.util.function.BiFunction<X,X,X> addPrefix,
                 java.util.function.BiFunction<X,X,X> delPrefix)
Construct a new prefix substituter. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
X | 
apply(X item)
Apply a prefix substitution if any applies. 
 | 
void | 
put(X from,
   X to)
Add a prefix substitution to the applicable set. 
 | 
public PrefixSubstituter(java.util.function.BiPredicate<X,X> isPrefixOf, java.util.function.BiFunction<X,X,X> addPrefix, java.util.function.BiFunction<X,X,X> delPrefix)
isPrefixOf - test if the first argument prefixes the secondaddPrefix - prefix the first argument to the seconddelPrefix - remove the first argument from the start of the second