WireType
- the wire type of the converters maintained in this selection
strategy.public class PredicateConverterSelectionStrategy<WireType> extends Object implements ConverterSelectionStrategy<WireType>
Modifier and Type | Class and Description |
---|---|
static class |
PredicateConverterSelectionStrategy.ExactKeyPredicate
Checks whether a key exactly matches a given template.
|
static interface |
PredicateConverterSelectionStrategy.Predicate
Interface for predicates that can be used to decide which converter to
select.
|
static class |
PredicateConverterSelectionStrategy.RegExPredicate
A
PredicateConverterSelectionStrategy.Predicate that checks keys against a given regular expression. |
Constructor and Description |
---|
PredicateConverterSelectionStrategy() |
Modifier and Type | Method and Description |
---|---|
void |
addConverter(PredicateConverterSelectionStrategy.Predicate predicate,
Converter<WireType> converter)
Adds a new converter to the strategy for the given predicate.
|
boolean |
equals(Object obj) |
Converter<WireType> |
getConverter(String key)
Tries to look up the converter designated by @a key.
|
int |
hashCode() |
public Converter<WireType> getConverter(String key)
ConverterSelectionStrategy
getConverter
in interface ConverterSelectionStrategy<WireType>
key
- the keypublic void addConverter(PredicateConverterSelectionStrategy.Predicate predicate, Converter<WireType> converter)
predicate
- the predicate deciding whether this converter will be chosen
or notconverter
- the converterCopyright © 2018 CoR-Lab. All rights reserved.