public interface JxnCloneableAlgebra
cloneThis()
method. opndLeft op opndRght
as opndLeft.op(opndRght)
and the implemented instance method op
modifies the instance opndLeft
, the
left side operand opndLeft
in the expression opndLeft op opndRght
is
cloned internally using opndLeft.
cloneThis()
before calling the operator method to avoid an unintended modification of opndLeft
.
The operator method is not necessarily required by JXN to modify the instance (it is sufficient, that the operator method returns the result)
but saves memory and processing time, if the algebra objects are large. If the operator methods of a class like e.g.
java.math.
BigInteger
or → CommonsMath /
BigFraction
do not modify the left side operand the class can be used in JXN arithmetic expressions without the implementation of this interface.Modifier and Type | Method and Description |
---|---|
JxnCloneableAlgebra |
cloneThis()
Called internally.
|
JxnCloneableAlgebra cloneThis()
opndLeft
in
opndLeft op opndRght
, if op
is implemented as
opndLeft.op(opndRght)
and the instance method op
modifies the instance.© 2013-18 K.-M. Graf Fachbereich EIT Hochschule Darmstadt JXN