I - type of inputsO - type of outputpublic interface BinaryInplaceOp<I,O extends I> extends BinaryInplace1Op<I,I,O>
It is a special case of BinaryInplace1Op, which can mutate
only the first input.
Note that the <I> and <O> type parameters are kept distinct
for special hybrid ops, which may allow inplace mutation without
requiring it; see e.g. BinaryHybridCFI. However, due to
limitations of Java generics, the <I1> and <I2> parameters
must be collapsed into a single <I>, since it is not legal
to write <I1, I2, O extends I1 & I2> ("Cannot specify any
additional bound I2 when first bound is a type parameter").
BinaryComputerOp,
BinaryFunctionOpSpecialOp.Flavor| Modifier and Type | Method and Description |
|---|---|
default BinaryInplaceOp<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.
|
void |
mutate2(I in,
O arg)
Mutates the second argument in-place.
|
default O |
run(I input1,
I input2,
O output)
Executes the operation in a type-safe but flexible way.
|
in, in1, mutate, mutate1, runin2, setInput, setInput1, setInput2run, runcandidates, filterArity, opops, setEnvironmentinitializevoid mutate2(I in, O arg)
in - First argument of the BinaryInplaceOp, which will
not be mutated.arg - Second argument of the BinaryInplaceOp, which
will be mutated.default O run(I input1, I input2, O output)
BinaryOpThe exact behavior depends on the type of special op.
run in interface BinaryInplace1Op<I,I,O extends I>run in interface BinaryOp<I,I,O extends I>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),
run(Object, Object, Object),
BinaryHybridCF.run(Object, Object, Object)default BinaryInplaceOp<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 BinaryInplace1Op<I,I,O extends I>getIndependentInstance in interface BinaryOp<I,I,O extends I>getIndependentInstance in interface NullaryOp<O extends I>getIndependentInstance in interface SpecialOpgetIndependentInstance in interface ThreadablegetIndependentInstance in interface UnaryInplaceOp<I,O extends I>getIndependentInstance in interface UnaryOp<I,O extends I>Copyright © 2014–2022 ImageJ. All rights reserved.