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>
UnaryFunctionOp
s that delegate to
UnaryComputerOp
s.
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, setInput
ops, setEnvironment
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createWorker
getArity, getIndependentInstance, run, run
candidates, filterArity, op
ops, setEnvironment
in, setInput
createOutput
calculate, getIndependentInstance, run
run
public O calculate(I input)
UnaryFunctionOp
public void initialize()
Initializable
initialize
in interface Initializable
Copyright © 2014–2022 ImageJ. All rights reserved.