FreqMapExtractor

See javadoc - uk.gov.gchq.gaffer.types.function.FreqMapExtractor

Available since Gaffer version 1.0.0

Extracts a count from a frequency map for a given key.

Examples

Multiply all map values by 10

Java
JSON
Full JSON
Python
final FreqMapExtractor function = new FreqMapExtractor("key1");
{
  "class" : "FreqMapExtractor",
  "key" : "key1"
}
{
  "class" : "uk.gov.gchq.gaffer.types.function.FreqMapExtractor",
  "key" : "key1"
}
g.FreqMapExtractor( 
  key="key1" 
)

Input type:

uk.gov.gchq.gaffer.types.FreqMap

Example inputs:

Input TypeInputResult TypeResult
uk.gov.gchq.gaffer.types.FreqMap{key1=1, key2=2, key3=3}java.lang.Long1
uk.gov.gchq.gaffer.types.FreqMap{key2=2, key3=3}null
java.util.HashMap{key1=1, key2=2, key3=3}ClassCastException: java.util.HashMap cannot be cast to uk.gov.gchq.gaffer.types.FreqMap
nullnull

results matching ""

    No results matching ""