T
- type of the function input, called domain of the functionR
- type of the function output, called codomain of the function@Deprecated public interface PartialFunction<T,R> extends Function1<T,R>
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 |
---|---|
static long |
serialVersionUID
Deprecated.
The serial version uid.
|
Modifier and Type | Method and Description |
---|---|
R |
apply(T t)
Deprecated.
Applies this function to the given argument and returns the result.
|
boolean |
isDefinedAt(T value)
Deprecated.
Tests if a value is contained in the function's domain.
|
default Function1<T,Option<R>> |
lift()
Deprecated.
Lifts this partial function into a total function that returns an
Option result. |
static final long serialVersionUID
boolean isDefinedAt(T value)
value
- a potential function argument