I - type of inputO - type of outputpublic interface UnaryFunctionOp<I,O> extends UnaryOp<I,O>, NullaryFunctionOp<O>
A unary function may be treated as a NullaryFunctionOp by holding the
input constant.
UnaryComputerOp,
UnaryInplaceOpSpecialOp.Flavor| Modifier and Type | Method and Description |
|---|---|
default O |
calculate()
Calculates the output value.
|
O |
calculate(I input)
Calculates the output given some input.
|
default UnaryFunctionOp<I,O> |
getIndependentInstance()
Gets a reference to an instance of this object which can be used
simultaneously from a second thread while this instance is being used from
"its" thread.
|
default O |
run(I input,
O output)
Executes the operation in a type-safe but flexible way.
|
in, setInputruncandidates, filterArity, opops, setEnvironmentinitializeO calculate(I input)
input - Argument to the functiondefault O run(I input, O output)
UnaryOpThe exact behavior depends on the type of special op.
run in interface UnaryOp<I,O>input - argument to the operationoutput - reference where the operation's result will be storedUnaryComputerOp.run(Object, Object),
run(Object, Object),
UnaryInplaceOp.run(Object, Object),
UnaryHybridCF.run(Object, Object)default O calculate()
NullaryFunctionOpcalculate in interface NullaryFunctionOp<O>default UnaryFunctionOp<I,O> getIndependentInstance()
ThreadableIt is expected that subclasses which override this method will narrow the return type appropriately. We do not enforce this at compile time via recursive generics due to their complexity: they introduce a host of typing difficulties.
getIndependentInstance in interface NullaryFunctionOp<O>getIndependentInstance in interface NullaryOp<O>getIndependentInstance in interface SpecialOpgetIndependentInstance in interface ThreadablegetIndependentInstance in interface UnaryOp<I,O>Copyright © 2014–2022 ImageJ. All rights reserved.