java.lang.Object | |
↳ | com.atlassian.jira.util.Functions |
Useful standard functions.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Transform to a super class.
| |||||||||||
Get a function that always the input downcast to the supplied class.
| |||||||||||
Get a function that always returns the input.
| |||||||||||
Get a visitor that will apply the given
function before delegating to another visitor. | |||||||||||
Memoizer maps an input to an output and always returns the mapped result
rather than calling the wrapped function every time.
| |||||||||||
Map to a google-collections Function.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Transform to a super class. Usually needs to be called with explicit type parameters, eg:
Functions.<SuperClass, SubClass> coerceToSuper();
Get a function that always the input downcast to the supplied class.
Get a function that always returns the input.
Get a visitor that will apply the given function
before delegating to another visitor.
mappingFunction | the mapping function to apply |
---|---|
delegate | the visitor to call with the function output values |
Memoizer maps an input to an output and always returns the mapped result rather than calling the wrapped function every time. Useful when the wrapped function is expensive to call.
Note, once mapped the input and the result can only be externally removed. Also, if the supplied function returns nulls then no memoization will occur.
function | for supplying the initial value that gets mapped |
---|---|
map | for storing the key-value mappings |
Map to a google-collections Function.
function | the function to map |
---|