If the function is not defined for a specific value, apply() may produce an arbitrary result. More specifically it is not guaranteed that the function will throw an exception.
If the function is defined for a specific value, apply() may still throw an exception.
| Modifier and Type | Field and Description |
|---|---|
| public static final long |
| Modifier and Type | Method and Description |
|---|---|
| public R | Returns: the result of function applicationthe argument t)Redeclares io. Applies this function to the given argument and returns the result. |
| public static < type of the underlying value of the input T, Value.type of the function input, called domain of the function V extends Value | Returns: a partial function that maps aValue to its underlying value.Factory method for creating a partial function that maps a given |
| public boolean | Returns: true, if the given value is contained in the function's domain, false otherwisea potential function argument value)Tests if a value is contained in the function's domain. |
| public default Function1 | Returns: a function that applies arguments to this function and returnsSome(result)
if the function is defined for the given arguments, and None otherwise.Lifts this partial function into a total function that returns an |
| public static < type of the function input, called domain of the function T, type of the function output, called codomain of the function R> PartialFunction |
| serialVersionUID | back to summary |
|---|---|
| public static final long serialVersionUID Hides io. The serial version uid. | |
| apply | back to summary |
|---|---|
| public R apply(T t) Redeclares io. Applies this function to the given argument and returns the result.
| |
| getIfDefined | back to summary |
|---|---|
| public static <T, V extends Value Factory method for creating a partial function that maps a given
| |
| isDefinedAt | back to summary |
|---|---|
| public boolean isDefinedAt(T value) Tests if a value is contained in the function's domain.
| |
| lift | back to summary |
|---|---|
| public default Function1 Lifts this partial function into a total function that returns an | |
| unlift | back to summary |
|---|---|
| public static <T, R> PartialFunction Unlifts a
| |