Package hydra.lib.maps
Class FilterWithKey
java.lang.Object
hydra.tools.PrimitiveFunction
hydra.lib.maps.FilterWithKey
Filters map entries by key and value.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFilters entries based on a curried key-value predicate (used by generated code).static <K,V> Map<K, V> Filters entries based on a curried key-value predicate (used by generated code).Get the implementation of this primitive function.name()Get the name of this primitive function.type()Get the type scheme of this primitive function.Methods inherited from class hydra.tools.PrimitiveFunction
term, toNative
-
Constructor Details
-
FilterWithKey
public FilterWithKey()
-
-
Method Details
-
name
Get the name of this primitive function.- Specified by:
namein classPrimitiveFunction- Returns:
- the name
-
type
Get the type scheme of this primitive function.- Specified by:
typein classPrimitiveFunction- Returns:
- the type scheme
-
implementation
Get the implementation of this primitive function.- Specified by:
implementationin classPrimitiveFunction- Returns:
- the implementation function
-
apply
Filters entries based on a curried key-value predicate (used by generated code).- Type Parameters:
K- the key typeV- the value type- Parameters:
pred- the curried predicate: key -> value -> Boolean- Returns:
- a function that takes a map and returns the filtered map
-
apply
Filters entries based on a curried key-value predicate (used by generated code).- Type Parameters:
K- the key typeV- the value type- Parameters:
pred- the curried predicate: key -> value -> Booleanmp- the map to filter- Returns:
- the filtered map
-