/** Sets a new Knowledge2 for the algorithm. */ public void setKnowledge(IKnowledge knowledge) { if (knowledge == null) { throw new NullPointerException("Cannot set a null knowledge."); } this.knowledge = knowledge.copy(); }