T
- type of the function input, called domain of the functionR
- type of the function output, called codomain of the functionpublic interface PartialFunction<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 | Method and Description |
---|---|
R |
apply(T t)
Applies this function to the given argument and returns the result.
|
boolean |
isDefinedAt(T value)
Tests if a value is contained in the function's domain.
|
R apply(T t)
t
- the argumentboolean isDefinedAt(T value)
value
- a potential function argumentCopyright © 2019. All Rights Reserved.