/*
 *   Calccedo Library
 *   hint this code under ApacheLicense
 */


package com.precious.calccedo.handlers;

import java.util.HashMap;

/**
 *
 * @author Ibrahim Abdsaid Hanna
 *         ibrahim.seniore@gmail.com
 */

public class CustomOperandMap {
    
    /**
     *HashMap contains all custom operands added by calcceodo like:Sin(30)=0.5 as a default operands 
     * and ready to contain any custom operand added by developer 
     * it is public static so you can view it and handle it, but you should care while dealing with it because 
     * it is contain pre dependent operands, so you should not change it's value 
     */
    public static HashMap<String, Object> customOperandMap_Constant=new HashMap<>();
    
    /**
     *Constructor of CustomOperandMap class, act as default constructor
     */
    public  CustomOperandMap(){
    }
    
    /**
     *this method to add custom operand that handle integer value as a fact like Sin(30)=0.5 
     * @param customOperand   operand name>>>>>> Sin
     * @param quoteNumber     argument as int >>>>>> 30
     * @param value           value that custom operand should produce  >>>>>> 0.5
     */
    public void add(String customOperand, int quoteNumber,double value){
      customOperandMap_Constant.put(customOperand+quoteNumber, new CustomOperand(customOperand+quoteNumber, value));
    }
    
     /**
     *this method to add custom operand that handle double value as a fact like Sin(30.0)=0.5 
     * @param customOperand   operand name>>>>>> Sin
     * @param quoteNumber     argument as double >>>>>> 30.0
     * @param value           value that custom operand should produce >>>>>> 0.5
     */
    public  void add(String customOperand, double quoteNumber,double value){
         customOperandMap_Constant.put(customOperand+quoteNumber, new CustomOperand(customOperand+quoteNumber, value));
    }
    
     /**
     *this method to add infinity fact to custom operand that handle integer value like Tan(90)= Error,Infinity
     * @param customOperand   operand name>>>>>> Tan
     * @param quoteNumber     argument number int >>>>>> 90
     * @param object          value that custom operand should produce infinity.class
     */
    public  void add(String customOperand, int quoteNumber,Object object){
         customOperandMap_Constant.put(customOperand+quoteNumber, object);
    }
    
    /**
     *this method to add infinity fact to custom operand that handle double value Tan(90.0)= Error,Infinity
     * @param customOperand  operand name>>>>>> Tan 
     * @param quoteNumber    argument number double >>>>>> 90.0
     * @param object         value that custom operand should produce infinity.class
     */
    public  void add(String customOperand, double quoteNumber,Object object){
         customOperandMap_Constant.put(customOperand+quoteNumber, object);
    }
    
    /**
     *
     * @return HashMap of custom operands
     */
    public HashMap<String,Object> getcustomOperandMap_Constant(){
         return customOperandMap_Constant;
     }   

    /**
     *
     * @return This is utility class to add custom operands, it is overload four method with add syntax
     */
    @Override
    public String toString() {
        return "This is utility class to add custom operands, it is overload four method with add syntax";
    }
    
    
}

@@ -105,16 +105,44 @@
 dlers;%0A%0A
+import java.util.ArrayList;%0A
 import j
@@ -159,16 +159,16 @@
 ashMap;%0A
-
 %0A/**%0A *%0A
@@ -743,16 +743,721 @@
 ap%3C%3E();%0A
+  %0A     /**%0A     * list to hold first character of custom operand name to pass it to CalccedoHandler Sin %3E%3E%3E will hold S%0A     */%0A    public static ArrayList%3CCharacter%3E customOperandCharacters=new ArrayList%3C%3E(); %0A    %0A    /**%0A     * list to hold custom operand name to pass it to SubFormula Handler Sin %3E%3E%3E will hold Sin%0A     */%0A    public static ArrayList%3CString%3E  customOperandNames=new ArrayList%3C%3E();%0A    %0A    /**%0A     * configure customOperandCharacters and customOperandNames to hold prefix symbols %3C,(%0A     */  %0A    static%7B%0A        customOperandCharacters.add('%3C');%0A        customOperandCharacters.add('(');%0A        customOperandCharacters.add('l');%0A        customOperandNames.add(%22log%22);%0A    %7D%0A    %0A
     %0A   
@@ -1569,24 +1569,33 @@
 erandMap()%7B%0A
+        %0A
     %7D%0A    %0A 
@@ -2077,32 +2077,77 @@
 umber, value));%0A
+      integrateCustomOperand(customOperand);%0A
     %7D%0A    %0A     
@@ -2642,24 +2642,72 @@
 r, value));%0A
+         integrateCustomOperand(customOperand);%0A
     %7D%0A    %0A 
@@ -3175,32 +3175,80 @@
 umber, object);%0A
+         integrateCustomOperand(customOperand);%0A
     %7D%0A    %0A    /
@@ -3721,25 +3721,414 @@
 bject);%0A    
-%7D
+     integrateCustomOperand(customOperand);%0A    %7D%0A    %0A    /**%0A     * this method to integrate custom operand characteristics into calccedo engine%0A     * @param customOperand operand name%3E%3E%3E%3E%3E%3E sin,pi%0A     */%0A    public void integrateCustomOperand(String customOperand)%7B%0A        customOperandCharacters.add(customOperand.charAt(0));%0A        customOperandNames.add(customOperand);%0A    %7D%0A    
 %0A    %0A    /*

Update CustomOperandMap.java