public class MapLookupExtractor extends LookupExtractor
Constructor and Description |
---|
MapLookupExtractor(Map<String,String> map,
boolean isOneToOne) |
Modifier and Type | Method and Description |
---|---|
String |
apply(String key)
Apply a particular lookup methodology to the input string
|
boolean |
canIterate()
Returns true if this lookup extractor's
LookupExtractor.iterable() method will return a valid iterator. |
boolean |
equals(Object o) |
byte[] |
getCacheKey()
Create a cache key for use in results caching
|
Map<String,String> |
getMap() |
int |
hashCode() |
boolean |
isOneToOne() |
Iterable<Map.Entry<String,String>> |
iterable()
Returns an Iterable that iterates over the keys and values in this lookup extractor.
|
List<String> |
unapply(String value)
Provide the reverse mapping from a given value to a list of keys
|
applyAll, unapplyAll
@Nullable public String apply(@Nullable String key)
LookupExtractor
apply
in class LookupExtractor
key
- The value to apply the lookup to.public List<String> unapply(@Nullable String value)
LookupExtractor
unapply
in class LookupExtractor
value
- the value to apply the reverse lookuppublic boolean isOneToOne()
isOneToOne
in class LookupExtractor
public byte[] getCacheKey()
LookupExtractor
getCacheKey
in class LookupExtractor
public boolean canIterate()
LookupExtractor
LookupExtractor.iterable()
method will return a valid iterator.canIterate
in class LookupExtractor
public Iterable<Map.Entry<String,String>> iterable()
LookupExtractor
iterable
in class LookupExtractor
Copyright © 2011–2021 The Apache Software Foundation. All rights reserved.