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 class
A 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 TypeMethodDescriptionboolean
active()
isActive.copy()
copy.getSupportedEvents.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 DefaultTetradLoggerConfig
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.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 createEvent
s 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
DefaultTetradLoggerConfig
object
-
copy
copy.
- Specified by:
copy
in interfaceTetradLoggerConfig
- Returns:
- a
TetradLoggerConfig
object
-
isEventActive
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
- Parameters:
id
- aString
object- Returns:
- a boolean
-
active
public boolean active()isActive.
- Specified by:
active
in interfaceTetradLoggerConfig
- Returns:
- a boolean
-
getSupportedEvents
getSupportedEvents.
- Specified by:
getSupportedEvents
in interfaceTetradLoggerConfig
- Returns:
- a
List
object
-
setEventActive
Sets whether the event associated with the given id is active or not.- Specified by:
setEventActive
in interfaceTetradLoggerConfig
- Parameters:
id
- aString
objectactive
- a boolean
-
toString
toString.
- Specified by:
toString
in interfaceTetradLoggerConfig
- Overrides:
toString
in classObject
- Returns:
- a
String
object
-