Interface Stateful

All Known Subinterfaces:
Algorithm, EpsilonBoxEvolutionaryAlgorithm, EvolutionaryAlgorithm
All Known Implementing Classes:
AbstractAlgorithm, AbstractEvolutionaryAlgorithm, AbstractPSOAlgorithm, AbstractSimulatedAnnealingAlgorithm, AdaptiveGridArchive, AdaptiveTimeContinuationExtension, AGEMOEAII, AlgorithmWrapper, AMOSA, CheckpointExtension, CMAES, DBEA, DifferentialEvolution, EpsilonBoxDominanceArchive, EpsilonMOEA, EpsilonNSGAII, EpsilonProgressContinuationExtension, EvolutionStrategy, Extensions, FitnessBasedArchive, GDE3, GeneticAlgorithm, IBEA, InstrumentedAlgorithm, InstrumentedExtension, IslandMigrationExtension, MOEAD, MSOPS, MSOPSRankedPopulation, NondominatedPopulation, NondominatedSortingPopulation, NSGAII, NSGAIII, OMOPSO, PAES, PeriodicExtension, PESA2, Population, RandomSearch, ReferencePointNondominatedSortingPopulation, ReferenceVectorGuidedPopulation, RepeatedSingleObjective, RuntimeCollectorExtension, RVEA, SimulatedAnnealing, SingleObjectiveEvolutionaryAlgorithm, SMPSO, SMSEMOA, SPEA2, UNSGAIII, VEGA

public interface Stateful
Interface for objects that can save and load their state.

This is distinct from Serializable as state aims to only capture the mutable state of an object, such as the current NFE and population for an Algorithm, whereas serialization stores the entire object graph unless fields are excluded using the transient keyword. This also allows loading the state into an existing object, rather than constructing a new, deserialized instance of the object. Serialization also requires access to a no-arg constructor on the first non-serializable superclass, which is not always possible when a class has required parameters.

That all being said, serialization is still useful for parallel or distributed computing, where objects need to be serialized to send to a different process or machine.