/** * This method is detected by the Java Serialization code and is called on * deserialization. It allows the object to deal with transient values. * * @return Returns this. */ protected Object readResolve() { if (this.algorithm != null) { // We need to hook up the listener after deserialization. // First remove (just in case the algorithm does serialize // listeners). this.algorithm.removeIterativeAlgorithmListener(this); // Now add again (to make sure that it is properly hooked up as a // listener). this.algorithm.addIterativeAlgorithmListener(this); } // We still resolve as the same object. return this; }
public int getMaxIterations() { return this.algorithm.getMaxIterations(); }
public void setMaxIterations( final int maxIterations) { this.algorithm.setMaxIterations(maxIterations); }
public void stop() { if (this.getAlgorithm() != null) { this.getAlgorithm().stop(); } }
@Override public int getIteration() { return this.getAlgorithm().getIteration(); }
public void stop() { if (this.getAlgorithm() != null) { this.getAlgorithm().stop(); } }
@Override public int getIteration() { return this.getAlgorithm().getIteration(); }
/** * Sets the underlying algorithm. * * @param algorithm * The underlying algorithm to wrap. */ public void setAlgorithm( final InternalAlgorithm algorithm) { // Remove any previous listener. if (this.algorithm != null) { this.algorithm.removeIterativeAlgorithmListener(this); } this.algorithm = algorithm; // Add a new listener. if (this.algorithm != null) { this.algorithm.addIterativeAlgorithmListener(this); } }
public void stop() { if (this.getAlgorithm() != null) { this.getAlgorithm().stop(); } }
@Override public int getIteration() { return this.getAlgorithm().getIteration(); }
public void setMaxIterations( final int maxIterations) { this.algorithm.setMaxIterations(maxIterations); }
public int getMaxIterations() { return this.algorithm.getMaxIterations(); }
/** * Sets the underlying algorithm. * * @param algorithm * The underlying algorithm to wrap. */ public void setAlgorithm( final InternalAlgorithm algorithm) { // Remove any previous listener. if (this.algorithm != null) { this.algorithm.removeIterativeAlgorithmListener(this); } this.algorithm = algorithm; // Add a new listener. if (this.algorithm != null) { this.algorithm.addIterativeAlgorithmListener(this); } }
public void setMaxIterations( final int maxIterations) { this.algorithm.setMaxIterations(maxIterations); }
public int getMaxIterations() { return this.algorithm.getMaxIterations(); }
/** * Sets the underlying algorithm. * * @param algorithm * The underlying algorithm to wrap. */ public void setAlgorithm( final InternalAlgorithm algorithm) { // Remove any previous listener. if (this.algorithm != null) { this.algorithm.removeIterativeAlgorithmListener(this); } this.algorithm = algorithm; // Add a new listener. if (this.algorithm != null) { this.algorithm.addIterativeAlgorithmListener(this); } }
/** * This method is detected by the Java Serialization code and is called on * deserialization. It allows the object to deal with transient values. * * @return Returns this. */ protected Object readResolve() { if (this.algorithm != null) { // We need to hook up the listener after deserialization. // First remove (just in case the algorithm does serialize // listeners). this.algorithm.removeIterativeAlgorithmListener(this); // Now add again (to make sure that it is properly hooked up as a // listener). this.algorithm.addIterativeAlgorithmListener(this); } // We still resolve as the same object. return this; }
/** * This method is detected by the Java Serialization code and is called on * deserialization. It allows the object to deal with transient values. * * @return Returns this. */ protected Object readResolve() { if (this.algorithm != null) { // We need to hook up the listener after deserialization. // First remove (just in case the algorithm does serialize // listeners). this.algorithm.removeIterativeAlgorithmListener(this); // Now add again (to make sure that it is properly hooked up as a // listener). this.algorithm.addIterativeAlgorithmListener(this); } // We still resolve as the same object. return this; }