Package edu.cmu.tetrad.util
Class DefaultTetradLoggerConfig
java.lang.Object
edu.cmu.tetrad.util.DefaultTetradLoggerConfig
- All Implemented Interfaces:
TetradLoggerConfig,TetradSerializable,Serializable
Logger configuration.
- Author:
- Tyler Gibson
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface edu.cmu.tetrad.util.TetradLoggerConfig
TetradLoggerConfig.Event -
Constructor Summary
ConstructorsConstructorDescriptionDefaultTetradLoggerConfig(String... events) Constructs the config for the given event ids.Constructs the config given the events in it. -
Method Summary
Modifier and TypeMethodDescriptioncopy()booleanisActive()States whether the config is active or not.booleanisEventActive(String id) States whether the event associated with the given id is active, that is whether it should be logged or not.static DefaultTetradLoggerConfigGenerates a simple exemplar of this class to test serialization.voidsetEventActive(String id, boolean active) Sets whether the event associated with the given id is active or not.toString()
-
Constructor Details
-
DefaultTetradLoggerConfig
Constructs the config given the events in it.- Parameters:
events- The events that the logger reports.
-
DefaultTetradLoggerConfig
Constructs the config for the given event ids. This will createEvents with no descriptions.- Parameters:
events- The events that the logger reports.
-
-
Method Details
-
serializableInstance
Generates a simple exemplar of this class to test serialization. -
copy
- Specified by:
copyin interfaceTetradLoggerConfig- Returns:
- a copy of this configuration.
-
isEventActive
Description copied from interface:TetradLoggerConfigStates whether the event associated with the given id is active, that is whether it should be logged or not.- Specified by:
isEventActivein interfaceTetradLoggerConfig
-
isActive
public boolean isActive()Description copied from interface:TetradLoggerConfigStates whether the config is active or not. THe config is considered active if there is at least one active event.- Specified by:
isActivein interfaceTetradLoggerConfig- Returns:
- - true iff its active.
-
getSupportedEvents
- Specified by:
getSupportedEventsin interfaceTetradLoggerConfig- Returns:
- - events
-
setEventActive
Description copied from interface:TetradLoggerConfigSets whether the event associated with the given id is active or not.- Specified by:
setEventActivein interfaceTetradLoggerConfig
-
toString
- Specified by:
toStringin interfaceTetradLoggerConfig- Overrides:
toStringin classObject- Returns:
- a string representation.
-