DictionaryLookup

See javadoc - uk.gov.gchq.koryphe.impl.function.DictionaryLookup

Available since Koryphe version 1.7.0

looks up a value in a Map

Examples

Dictionary lookup example

Java
JSON
Full JSON
Python
final DictionaryLookup<Integer, String> dictionaryLookup = new DictionaryLookup<>(map);
{
  "class" : "DictionaryLookup",
  "dictionary" : {
    "1" : "one",
    "2" : "two",
    "3" : "three"
  }
}
{
  "class" : "uk.gov.gchq.koryphe.impl.function.DictionaryLookup",
  "dictionary" : {
    "1" : "one",
    "2" : "two",
    "3" : "three"
  }
}
g.DictionaryLookup( 
  dictionary={'1': 'one', '2': 'two', '3': 'three'} 
)

Input type:

java.lang.Object

Example inputs:

Input TypeInputResult TypeResult
java.lang.Integer1java.lang.Stringone
nullnull
java.lang.Integer4null
java.lang.Long2null

results matching ""

    No results matching ""