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 |
canGetKeySet()
Returns true if this lookup extractor's
LookupExtractor.keySet() method will return a valid set. |
boolean |
canIterate()
Returns true if this lookup extractor's
LookupExtractor.iterable() method will return a valid iterator. |
boolean |
equals(Object o) |
long |
estimateHeapFootprint()
Estimated heap footprint of this object.
|
static <K,V> long |
estimateHeapFootprint(Map<K,V> map)
Estimate the heap footprint of a Map.
|
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.
|
Set<String> |
keySet()
Returns a Set of all keys in this lookup extractor.
|
List<String> |
unapply(String value)
Provide the reverse mapping from a given value to a list of keys
|
applyAll, unapplyAllpublic static <K,V> long estimateHeapFootprint(@Nullable Map<K,V> map)
@Nullable public String apply(@Nullable String key)
LookupExtractorapply in class LookupExtractorkey - The value to apply the lookup to.public List<String> unapply(@Nullable String value)
LookupExtractorunapply in class LookupExtractorvalue - the value to apply the reverse lookuppublic boolean isOneToOne()
isOneToOne in class LookupExtractorpublic byte[] getCacheKey()
LookupExtractorgetCacheKey in class LookupExtractorpublic boolean canIterate()
LookupExtractorLookupExtractor.iterable() method will return a valid iterator.canIterate in class LookupExtractorpublic boolean canGetKeySet()
LookupExtractorLookupExtractor.keySet() method will return a valid set.canGetKeySet in class LookupExtractorpublic Iterable<Map.Entry<String,String>> iterable()
LookupExtractoriterable in class LookupExtractorpublic Set<String> keySet()
LookupExtractorkeySet in class LookupExtractorpublic long estimateHeapFootprint()
LookupExtractorMapLookupExtractor,
does have a reasonable implementation.
This API is provided for best-effort memory management and monitoring.estimateHeapFootprint in class LookupExtractorCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.