Package edu.cmu.tetrad.util
Class DefaultTetradLoggerConfig
java.lang.Object
edu.cmu.tetrad.util.DefaultTetradLoggerConfig
- All Implemented Interfaces:
TetradLoggerConfig,TetradSerializable,Serializable
Logger configuration.
- Version:
- $Id: $Id
- Author:
- Tyler Gibson
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA default implementation of the event.Nested 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 TypeMethodDescriptionbooleanactive()isActive.copy()copy.getSupportedEvents.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()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.- Returns:
- a
DefaultTetradLoggerConfigobject
-
copy
copy.
- Specified by:
copyin interfaceTetradLoggerConfig- Returns:
- a
TetradLoggerConfigobject
-
isEventActive
States whether the event associated with the given id is active, that is whether it should be logged or not.- Specified by:
isEventActivein interfaceTetradLoggerConfig- Parameters:
id- aStringobject- Returns:
- a boolean
-
active
public boolean active()isActive.
- Specified by:
activein interfaceTetradLoggerConfig- Returns:
- a boolean
-
getSupportedEvents
getSupportedEvents.
- Specified by:
getSupportedEventsin interfaceTetradLoggerConfig- Returns:
- a
Listobject
-
setEventActive
Sets whether the event associated with the given id is active or not.- Specified by:
setEventActivein interfaceTetradLoggerConfig- Parameters:
id- aStringobjectactive- a boolean
-
toString
toString.
- Specified by:
toStringin interfaceTetradLoggerConfig- Overrides:
toStringin classObject- Returns:
- a
Stringobject
-