001/** Indicates that the algebra requires cloning of the left side operand and implements a {@link #cloneThis cloneThis()} method. <br/>
002  * <b>Note: The following is relevant only if you want to implement your own algebra class.</b><br/>
003  * <br/>
004  * If the algebra implements the operation <code>opndLeft <i>op</i> opndRght</code> as <code> opndLeft.<i>op</i>(opndRght)</code>
005  * and the implemented instance method <code><i>op</i></code> modifies the instance {@code opndLeft}, the
006  * left side operand {@code opndLeft} in the expression <code> opndLeft <i>op</i> opndRght </code> is 
007  * cloned internally using {@code opndLeft.}{@link #cloneThis} before calling the operator method to avoid an unintended modification of {@code opndLeft}.
008  * The operator method is not necessarily required by JXN to modify the instance (it is sufficient, that the operator method returns the result)
009  * but saves memory and processing time, if the algebra objects are large. If the operator methods of a class like e.g.
010  * &rarr; {@code java.math.}{@link java.math.BigInteger} or
011  * <!-- &rarr; <a target="_blank" href="http://commons.apache.org/proper/commons-math/userguide/fraction.html">CommonsMath</a> / -->
012  * <a target="_top" href="../programmer_examples/commons_math_examples/0_CommonsMath_README.html">Commons Math</a> &rarr;
013  * <a target="_blank" href="http://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/index.html?org/apache/commons/math3/fraction/BigFraction.html"><code>BigFraction</code></a>
014  * <!--            <a href="http://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math4/fraction/BigFraction.html"><code>BigFraction</code></a>
015  * <a target="_blank" href="http://commons.apache.org/proper/commons-math/apidocs/index.html?org/apache/commons/math4/fraction/BigFraction.html"><code>BigFraction</code></a> -->
016  * do not modify the left side operand the class can be used in JXN arithmetic expressions without the implementation of this interface.
017  * @see <a target="_top" href="../programmer_examples/MyFractionAlgebra_UserDefinedAlgebra.html">user defined algebra</a>
018  */
019public interface JxnCloneableAlgebra
020{
021/* public static final String RCS_ID =
022   "@(#)$Header: E:\\Graf_priv\\Java\\KmgFormelAlgebra/RCS/KmgFormelAlgebra.java,v 2.17 2004/02/01 16:11:18 kmg_hst Exp $";
023   //   $Locker:  $
024   //   ACHTUNG: Gesperrte Dateien koennen bereits veraendert sein und
025   //            nicht mehr der oben angegebenen Revision entsprechen
026*/
027
028   /** Called internally.
029     * Required to avoid overwriting the left side operand {@code opndLeft} in
030     * <code> opndLeft <i>op</i> opndRght</code>, if <code><i>op</i></code> is implemented as 
031     * <code> opndLeft.<i>op</i>(opndRght)</code> and the instance method <code><i>op</i></code> 
032     * modifies the instance.
033     * @return copy of this instance
034     */
035   JxnCloneableAlgebra cloneThis();
036   // Kopie-Konstruktor statt cloneThis geht nicht, da Konstruktor nicht auf JxnCloneableAlgebra-Objekt aufgerufen werden kann
037}