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