Interface Configurable
- All Known Subinterfaces:
CoolingSchedule
,Mutation
,Variation
- All Known Implementing Classes:
AbstractCompoundVariation
,AbstractEvolutionaryAlgorithm
,AbstractPSOAlgorithm
,AbstractSimulatedAnnealingAlgorithm
,AdaptiveMetropolis
,AdaptiveMultimethodVariation
,AdaptiveTimeContinuation
,AdaptiveTimeContinuationExtension
,Add
,AGEMOEAII
,AlgorithmWrapper
,AMOSA
,BitFlip
,CMAES
,CompoundMutation
,CompoundVariation
,DBEA
,DifferentialEvolution
,DifferentialEvolutionVariation
,EpsilonMOEA
,EpsilonNSGAII
,EpsilonProgressContinuation
,EpsilonProgressContinuationExtension
,EvolutionStrategy
,Extensions
,GDE3
,GeneticAlgorithm
,GeometricCoolingSchedule
,GrammarCrossover
,GrammarMutation
,HUX
,IBEA
,Insertion
,InstrumentedAlgorithm
,MOEAD
,MSOPS
,MultiParentVariation
,NSGAII
,NSGAIII
,OMOPSO
,OnePointCrossover
,PAES
,PCX
,PESA2
,PM
,PMX
,PointMutation
,RandomSearch
,Remove
,Replace
,RVEA
,SBX
,SelfAdaptiveNormalVariation
,SimulatedAnnealing
,SingleObjectiveEvolutionaryAlgorithm
,SMPSO
,SMSEMOA
,SPEA2
,SPEA2.StrengthFitnessEvaluator
,SPX
,SSX
,SubtreeCrossover
,Swap
,TemperatureBasedTerminationCondition
,TwoPointCrossover
,TypeSafeCrossover
,TypeSafeMutation
,UM
,UNDX
,UniformCrossover
,UNSGAIII
,VEGA
public interface Configurable
Interface for classes that can be configured either explicitly by overriding the methods defined by this
interface or auto-configurable by using the annotations available in this package.
With auto-configuration, in addition to processing annotated setters, it will also check each getter method
and recursively process any that also implement this interface. However, it will not scan any collection
types, such as
Iterable
, Collection
, List
, etc., even if they contain
Configurable
types.-
Method Summary
Modifier and TypeMethodDescriptiondefault void
applyConfiguration
(TypedProperties properties) Applies the properties to this instance.default TypedProperties
Gets the current configuration of this instance.
-
Method Details
-
applyConfiguration
Applies the properties to this instance. It is strongly recommended to apply a configuration immediately after creating the instance, as some properties can not be changed after the class is used. Exceptions may be thrown if attempting to set such properties. After calling this method, we encourage users to callTypedProperties.warnIfUnaccessedProperties()
to verify all properties were processed. This can identify simple mistakes like typos. If overriding this method, properties should only be updated if a new value is provided. Additionally, if updating anyConfigurable
objects inside this object, they should be updated before callingsuper.applyConfiguration(properties)
.- Parameters:
properties
- the user-defined properties
-
getConfiguration
Gets the current configuration of this instance. In theory, these properties should be able to create a duplicate instance. Note however, they are unlikely to behave identically due to random numbers and other transient fields.- Returns:
- the properties defining this instance
-