I1
- type of first inputI2
- type of second inputO
- type of outputpublic interface BinaryHybridCI1<I1,I2,O extends I1> extends BinaryComputerOp<I1,I2,O>, BinaryInplace1Op<I1,I2,O>, UnaryHybridCI<I1,O>
BinaryComputerOp
, or
BinaryInplace1Op
.
To populate a preallocated output object, call
BinaryComputerOp.compute(I1, I2, O)
; to mutate the first input inplace, call
BinaryInplace1Op.mutate1(O, I2)
. To do any of these things as appropriate,
call run(Object, Object, Object)
.
BinaryHybridCF
,
BinaryHybridCFI
SpecialOp.Flavor
Modifier and Type | Method and Description |
---|---|
default BinaryHybridCI1<I1,I2,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 void |
mutate(O arg)
Mutates the given input argument in-place.
|
default void |
run() |
default O |
run(I1 input1,
I2 input2,
O output)
Executes the operation in a type-safe but flexible way.
|
compute, compute
in, in1, mutate1
in2, setInput, setInput1, setInput2
run, run
compute
setOutput
candidates, filterArity, op
ops, setEnvironment
initialize
default void mutate(O arg)
UnaryInplaceOp
mutate
in interface BinaryInplace1Op<I1,I2,O extends I1>
mutate
in interface UnaryHybridCI<I1,O extends I1>
mutate
in interface UnaryInplaceOp<I1,O extends I1>
arg
- of the UnaryInplaceOp
default O run(I1 input1, I2 input2, O output)
BinaryOp
The exact behavior depends on the type of special op.
run
in interface BinaryComputerOp<I1,I2,O extends I1>
run
in interface BinaryInplace1Op<I1,I2,O extends I1>
run
in interface BinaryOp<I1,I2,O extends I1>
input1
- first argument to the operationinput2
- second argument to the operationoutput
- reference where the operation's result will be storedBinaryComputerOp.run(Object, Object, Object)
,
BinaryFunctionOp.run(Object, Object, Object)
,
BinaryInplaceOp.run(Object, Object, Object)
,
BinaryHybridCF.run(Object, Object, Object)
default void run()
run
in interface BinaryComputerOp<I1,I2,O extends I1>
run
in interface BinaryInplace1Op<I1,I2,O extends I1>
run
in interface BinaryOp<I1,I2,O extends I1>
run
in interface NullaryComputerOp<O extends I1>
run
in interface NullaryOp<O extends I1>
run
in interface Runnable
run
in interface UnaryComputerOp<I1,O extends I1>
run
in interface UnaryHybridCI<I1,O extends I1>
run
in interface UnaryOp<I1,O extends I1>
default BinaryHybridCI1<I1,I2,O> getIndependentInstance()
Threadable
It 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 BinaryComputerOp<I1,I2,O extends I1>
getIndependentInstance
in interface BinaryInplace1Op<I1,I2,O extends I1>
getIndependentInstance
in interface BinaryOp<I1,I2,O extends I1>
getIndependentInstance
in interface NullaryComputerOp<O extends I1>
getIndependentInstance
in interface NullaryOp<O extends I1>
getIndependentInstance
in interface SpecialOp
getIndependentInstance
in interface Threadable
getIndependentInstance
in interface UnaryComputerOp<I1,O extends I1>
getIndependentInstance
in interface UnaryHybridCI<I1,O extends I1>
getIndependentInstance
in interface UnaryInplaceOp<I1,O extends I1>
getIndependentInstance
in interface UnaryOp<I1,O extends I1>
Copyright © 2014–2022 ImageJ. All rights reserved.