I - type of inputO - type of outputDI - type of input accepted by the worker opDO - type of output accepted by the worker oppublic abstract class UFViaUC<I extends DI,O extends DO,DI,DO> extends AbstractUnaryFunctionOp<I,O> implements DelegatingUnaryOp<I,O,DI,DO,UnaryComputerOp<DI,DO>>, UnaryOutputFactory<I,O>
UnaryFunctionOps that delegate to
UnaryComputerOps.
This is mostly useful when the UnaryComputerOp in question has a
generic type as output, which needs to be narrowed to a concrete type for the
purposes of the UnaryFunctionOp portion's return type. In this
scenario, a UnaryHybridCF cannot be used directly with type-safe
generics.
For example, a UnaryComputerOp whose output variable is a
T extends RealType<T> cannot be a UnaryHybridCF because we do
not know at runtime which sort of RealType matches the caller's
T parameter. However, a separate UnaryFunctionOp can be
created whose output is typed on e.g. DoubleType, with the
computation delegating to the wrapped UnaryComputerOp.
SpecialOp.Flavor| Constructor and Description |
|---|
UFViaUC() |
| Modifier and Type | Method and Description |
|---|---|
O |
calculate(I input)
Calculates the output given some input.
|
void |
initialize()
Initializes the object.
|
in, out, run, setInputops, setEnvironmentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateWorkergetArity, getIndependentInstance, run, runcandidates, filterArity, opops, setEnvironmentin, setInputcreateOutputcalculate, getIndependentInstance, runrunpublic O calculate(I input)
UnaryFunctionOppublic void initialize()
Initializableinitialize in interface InitializableCopyright © 2014–2022 ImageJ. All rights reserved.