Package edu.cmu.tetrad.util
Class TetradLogger.EmptyConfig
java.lang.Object
edu.cmu.tetrad.util.TetradLogger.EmptyConfig
- All Implemented Interfaces:
TetradLoggerConfig
,TetradSerializable
,Serializable
- Enclosing class:
- TetradLogger
A empty config, where no event is active.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface edu.cmu.tetrad.util.TetradLoggerConfig
TetradLoggerConfig.Event
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()
boolean
isActive()
States whether the config is active or not.boolean
isEventActive
(String id) States whether the event associated with the given id is active, that is whether it should be logged or not.static TetradLogger.EmptyConfig
Generates a simple exemplar of this class to test serialization.void
setEventActive
(String id, boolean active) Sets whether the event associated with the given id is active or not.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface edu.cmu.tetrad.util.TetradLoggerConfig
toString
-
Constructor Details
-
EmptyConfig
public EmptyConfig(boolean active)
-
-
Method Details
-
serializableInstance
Generates a simple exemplar of this class to test serialization. -
isEventActive
Description copied from interface:TetradLoggerConfig
States whether the event associated with the given id is active, that is whether it should be logged or not.- Specified by:
isEventActive
in interfaceTetradLoggerConfig
-
isActive
public boolean isActive()Description copied from interface:TetradLoggerConfig
States whether the config is active or not. THe config is considered active if there is at least one active event.- Specified by:
isActive
in interfaceTetradLoggerConfig
- Returns:
- - true iff its active.
-
copy
- Specified by:
copy
in interfaceTetradLoggerConfig
- Returns:
- a copy of this configuration.
-
getSupportedEvents
- Specified by:
getSupportedEvents
in interfaceTetradLoggerConfig
- Returns:
- - events
-
setEventActive
Description copied from interface:TetradLoggerConfig
Sets whether the event associated with the given id is active or not.- Specified by:
setEventActive
in interfaceTetradLoggerConfig
-