Class AbstractSerializerConfig
java.lang.Object
es.urjc.etsii.grafo.io.serializers.AbstractSerializerConfig
- Direct Known Subclasses:
AbstractResultSerializerConfig
,AbstractSolutionSerializerConfig
This class is used to configure common serializer properties.
Includes both solution serializers and results serializers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet folder where this serializer should write its resultsGet filename format.boolean
Is the current serializer enabled?void
setEnabled
(boolean enabled) Change serializer enabled statusvoid
Set the folder where the serializer should writevoid
Change filename format
-
Constructor Details
-
AbstractSerializerConfig
public AbstractSerializerConfig()
-
-
Method Details
-
getFormat
Get filename format. The serializer will use this pattern to decide the filename.- Returns:
- filename format as a string
-
setFormat
Change filename format- Parameters:
format
- filename format as a string
-
isEnabled
public boolean isEnabled()Is the current serializer enabled? If the serializer is not enabled it should not do any operation.- Returns:
- true if enabled, false otherwise
-
setEnabled
public void setEnabled(boolean enabled) Change serializer enabled status- Parameters:
enabled
- true to enable, false to disable
-
getFolder
Get folder where this serializer should write its results- Returns:
- Path to folder as string
-
setFolder
Set the folder where the serializer should write- Parameters:
folder
- Path to folder as string
-