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  * {@code java.math.}{@link java.math.BigInteger} or &rarr; <a target="_blank" href="http://commons.apache.org/proper/commons-math/userguide/fraction.html">CommonsMath</a> / 
011  * <a href="http://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math4/fraction/BigFraction.html">BigFraction</a>
012  * do not modify the left side operand the class can be used in JXN arithmetic expressions without the implementation of this interface.
013  * @see <a target="_top" href="../programmer_examples/MyFractionAlgebra_UserDefinedAlgebra.html">user defined algebra</a>
014  */
015public interface JxnCloneableAlgebra
016{
017/* public static final String RCS_ID =
018   "@(#)$Header: E:\\Graf_priv\\Java\\KmgFormelAlgebra/RCS/KmgFormelAlgebra.java,v 2.17 2004/02/01 16:11:18 kmg_hst Exp $";
019   //   $Locker:  $
020   //   ACHTUNG: Gesperrte Dateien koennen bereits veraendert sein und
021   //            nicht mehr der oben angegebenen Revision entsprechen
022*/
023
024   /** Called internally.
025     * Required to avoid overwriting the left side operand {@code opndLeft} in
026     * <code> opndLeft <i>op</i> opndRght</code>, if <code><i>op</i></code> is implemented as 
027     * <code> opndLeft.<i>op</i>(opndRght)</code> and the instance method <code><i>op</i></code> 
028     * modifies the instance.
029     * @return copy of this instance
030     */
031   JxnCloneableAlgebra cloneThis();
032   // Kopie-Konstruktor statt cloneThis geht nicht, da Konstruktor nicht auf JxnCloneableAlgebra-Objekt aufgerufen werden kann
033}