Class AlgorithmEventHistoryRecorder
- java.lang.Object
-
- ai.libs.jaicore.graphvisualizer.events.recorder.AlgorithmEventHistoryRecorder
-
- All Implemented Interfaces:
AlgorithmEventListener
public class AlgorithmEventHistoryRecorder extends java.lang.Object implements AlgorithmEventListener
AnAlgorithmEventHistoryRecorderis responsible for recordingIAlgorithmEvents and storing them in the form ofIPropertyProcessedAlgorithmEvents. For doing so it requires a list ofAlgorithmEventPropertyComputers which can extract information fromIAlgorithmEvents which in turn is stored in theIPropertyProcessedAlgorithmEvents.
-
-
Constructor Summary
Constructors Constructor Description AlgorithmEventHistoryRecorder()AlgorithmEventHistoryRecorder(java.util.List<AlgorithmEventPropertyComputer> eventPropertyComputers)Creates a newAlgorithmEventHistoryRecorderwith the givenAlgorithmEventPropertyComputers.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPropertyComputer(AlgorithmEventPropertyComputer... computer)voidaddPropertyComputer(java.util.Collection<AlgorithmEventPropertyComputer> computers)AlgorithmEventHistorygetHistory()Returns theAlgorithmEventHistorywhich is produced up to this point by thisAlgorithmEventHistoryRecorder.AlgorithmEventPropertyComputergetInstalledCopyOfPropertyComputer(AlgorithmEventPropertyComputer propertyComputer)voidhandleAlgorithmEvent(org.api4.java.algorithm.events.IAlgorithmEvent algorithmEvent)booleanhasPropertyComputerInstalled(AlgorithmEventPropertyComputer propertyComputer)
-
-
-
Constructor Detail
-
AlgorithmEventHistoryRecorder
public AlgorithmEventHistoryRecorder()
-
AlgorithmEventHistoryRecorder
public AlgorithmEventHistoryRecorder(java.util.List<AlgorithmEventPropertyComputer> eventPropertyComputers)
Creates a newAlgorithmEventHistoryRecorderwith the givenAlgorithmEventPropertyComputers.- Parameters:
eventPropertyComputers- A list ofAlgorithmEventPropertyComputers which can extract information fromIAlgorithmEvents which in turn is stored in theIPropertyProcessedAlgorithmEvents.
-
-
Method Detail
-
hasPropertyComputerInstalled
public boolean hasPropertyComputerInstalled(AlgorithmEventPropertyComputer propertyComputer)
-
getInstalledCopyOfPropertyComputer
public AlgorithmEventPropertyComputer getInstalledCopyOfPropertyComputer(AlgorithmEventPropertyComputer propertyComputer)
-
addPropertyComputer
public void addPropertyComputer(java.util.Collection<AlgorithmEventPropertyComputer> computers)
-
addPropertyComputer
public void addPropertyComputer(AlgorithmEventPropertyComputer... computer)
-
handleAlgorithmEvent
public void handleAlgorithmEvent(org.api4.java.algorithm.events.IAlgorithmEvent algorithmEvent)
- Specified by:
handleAlgorithmEventin interfaceAlgorithmEventListener
-
getHistory
public AlgorithmEventHistory getHistory()
Returns theAlgorithmEventHistorywhich is produced up to this point by thisAlgorithmEventHistoryRecorder.- Returns:
- The
AlgorithmEventHistorywhich is produced up to this point by thisAlgorithmEventHistoryRecorder.
-
-