Interface Collector
- All Known Implementing Classes:
AdaptiveMultimethodVariationCollector
,AdaptiveTimeContinuationExtensionCollector
,ElapsedTimeCollector
,EpsilonProgressCollector
,IndicatorCollector
,PopulationSizeCollector
public interface Collector
Collects information from an object. In general, the object will be an algorithm or an object stored within an
algorithm. Collectors have two states: attached and unattached. Collectors are initially unattached, and are
attached to an appropriate object, called the attach point, by invoking
attach(Object)
. Once attached,
collect(ResultEntry)
may be invoked.-
Method Summary
Modifier and TypeMethodDescriptionReturns a new instance of this collector which has been attached to the specified object as identified by the attach point returned throughgetAttachPoint()
.void
collect
(ResultEntry result) Collects the requested information from the object, storing the data to the given result.Returns the attach point describing where this collector is attached.
-
Method Details
-
getAttachPoint
AttachPoint getAttachPoint()Returns the attach point describing where this collector is attached. The matched object should be unique.- Returns:
- the attach point describing where this collector is attached
-
attach
Returns a new instance of this collector which has been attached to the specified object as identified by the attach point returned throughgetAttachPoint()
.- Parameters:
object
- the matching object- Returns:
- a new instance of this collector which has been attached to the specified object
-
collect
Collects the requested information from the object, storing the data to the given result. This method must only be invoked after this collector has been attached to an appropriate object.- Parameters:
result
- the result for storing the collected data
-