public void addIterativeAlgorithmListener( final IterativeAlgorithmListener listener) { if (this.getListeners() == null) { // No list exists yet so create one. this.setListeners(new LinkedList<IterativeAlgorithmListener>()); } // Add the listener. this.getListeners().add(listener); }
/** * Creates a new instance of {@code AbstractIterativeAlgorithm}. * * @param iteration The initial iteration number. */ public AbstractIterativeAlgorithm( final int iteration) { super(); this.setIteration(iteration); this.setListeners(null); }
@Override public AbstractDecisionTreeLearner<InputType, OutputType> clone() { @SuppressWarnings("unchecked") final AbstractDecisionTreeLearner<InputType, OutputType> result = (AbstractDecisionTreeLearner<InputType, OutputType>) super.clone(); result.deciderLearner = ObjectUtil.cloneSafe(this.deciderLearner); return result; }
@Override public AbstractDecisionTreeLearner<InputType, OutputType> clone() { @SuppressWarnings("unchecked") final AbstractDecisionTreeLearner<InputType, OutputType> result = (AbstractDecisionTreeLearner<InputType, OutputType>) super.clone(); result.deciderLearner = ObjectUtil.cloneSafe(this.deciderLearner); return result; }
public void addIterativeAlgorithmListener( final IterativeAlgorithmListener listener) { if (this.getListeners() == null) { // No list exists yet so create one. this.setListeners(new LinkedList<IterativeAlgorithmListener>()); } // Add the listener. this.getListeners().add(listener); }
@Override public AbstractDecisionTreeLearner<InputType, OutputType> clone() { @SuppressWarnings("unchecked") final AbstractDecisionTreeLearner<InputType, OutputType> result = (AbstractDecisionTreeLearner<InputType, OutputType>) super.clone(); result.deciderLearner = ObjectUtil.cloneSafe(this.deciderLearner); return result; }
/** * Creates a new instance of {@code AbstractIterativeAlgorithm}. * * @param iteration The initial iteration number. */ public AbstractIterativeAlgorithm( final int iteration) { super(); this.setIteration(iteration); this.setListeners(null); }
public void addIterativeAlgorithmListener( final IterativeAlgorithmListener listener) { if (this.getListeners() == null) { // No list exists yet so create one. this.setListeners(new LinkedList<IterativeAlgorithmListener>()); } // Add the listener. this.getListeners().add(listener); }
@Override public AnytimeAlgorithmWrapper<ResultType, InternalAlgorithm> clone() { @SuppressWarnings("unchecked") final AnytimeAlgorithmWrapper<ResultType, InternalAlgorithm> clone = (AnytimeAlgorithmWrapper<ResultType, InternalAlgorithm>) super.clone(); clone.setAlgorithm(ObjectUtil.cloneSmart(this.getAlgorithm())); return clone; }
/** * Creates a new instance of {@code AbstractIterativeAlgorithm}. * * @param iteration The initial iteration number. */ public AbstractIterativeAlgorithm( final int iteration) { super(); this.setIteration(iteration); this.setListeners(null); }
public void removeIterativeAlgorithmListener( final IterativeAlgorithmListener listener) { if (this.getListeners() == null) { // No list to remove from. return; } // Remove the listener from the list. this.getListeners().remove(listener); if (this.getListeners().isEmpty()) { // No more listeners so null out the pointer to make the event // firing run faster. this.setListeners(null); } }
@Override public AnytimeAlgorithmWrapper<ResultType, InternalAlgorithm> clone() { @SuppressWarnings("unchecked") final AnytimeAlgorithmWrapper<ResultType, InternalAlgorithm> clone = (AnytimeAlgorithmWrapper<ResultType, InternalAlgorithm>) super.clone(); clone.setAlgorithm(ObjectUtil.cloneSmart(this.getAlgorithm())); return clone; }
public void removeIterativeAlgorithmListener( final IterativeAlgorithmListener listener) { if (this.getListeners() == null) { // No list to remove from. return; } // Remove the listener from the list. this.getListeners().remove(listener); if (this.getListeners().isEmpty()) { // No more listeners so null out the pointer to make the event // firing run faster. this.setListeners(null); } }
@Override public AnytimeAlgorithmWrapper<ResultType, InternalAlgorithm> clone() { @SuppressWarnings("unchecked") final AnytimeAlgorithmWrapper<ResultType, InternalAlgorithm> clone = (AnytimeAlgorithmWrapper<ResultType, InternalAlgorithm>) super.clone(); clone.setAlgorithm(ObjectUtil.cloneSmart(this.getAlgorithm())); return clone; }
public void removeIterativeAlgorithmListener( final IterativeAlgorithmListener listener) { if (this.getListeners() == null) { // No list to remove from. return; } // Remove the listener from the list. this.getListeners().remove(listener); if (this.getListeners().isEmpty()) { // No more listeners so null out the pointer to make the event // firing run faster. this.setListeners(null); } }