Package omero.util
Class PrefixSubstituter<X extends java.lang.Comparable<X>>
- java.lang.Object
-
- omero.util.PrefixSubstituter<X>
-
- Type Parameters:
X- the type of sequences that have prefixes needing substituting
public class PrefixSubstituter<X extends java.lang.Comparable<X>> extends java.lang.ObjectEfficiently applies prefix transformations from a set thereof.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Xapply(X item)Apply a prefix substitution if any applies.voidput(X from, X to)Add a prefix substitution to the applicable set.
-
-
-
Constructor Detail
-
PrefixSubstituter
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)
Construct a new prefix substituter.- Parameters:
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
-
-