code: public void addFunction(IFunction function, Color color) {
          if ((function != null) && (!functions.contains(function))) {
              functions.add(function);
              colors.add(color);
          } else
              colors.set(functions.indexOf(function), color);
      }
docs: Add a function to the set of functions