Record Class PrintConfiguration
java.lang.Object
java.lang.Record
org.tentackle.model.print.PrintConfiguration
- Record Components:
compact- compact output, i.e., omit implicit configurationasComment- print as a comment blockuseVariables- use variables in the printed modelmodelDefaults- optional model defaultsoptionAnnotations- annotations that should be printed as attribute optionscolumnGap- minimum number of spaces between columns in the attribute section
public record PrintConfiguration(boolean compact, boolean asComment, boolean useVariables, ModelDefaults modelDefaults, List<String> optionAnnotations, int columnGap)
extends Record
Holds parameters to configure the generated output.
-
Constructor Summary
ConstructorsConstructorDescriptionPrintConfiguration(boolean compact, boolean asComment, boolean useVariables, ModelDefaults modelDefaults, List<String> optionAnnotations, int columnGap) Creates an instance of aPrintConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theasCommentrecord component.intReturns the value of thecolumnGaprecord component.booleancompact()Returns the value of thecompactrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisOptionAnnotation(String annotation) Returns whether the given annotation should be printed as an attribute option.Returns the value of themodelDefaultsrecord component.Returns the value of theoptionAnnotationsrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theuseVariablesrecord component.
-
Constructor Details
-
PrintConfiguration
public PrintConfiguration(boolean compact, boolean asComment, boolean useVariables, ModelDefaults modelDefaults, List<String> optionAnnotations, int columnGap) Creates an instance of aPrintConfigurationrecord class.- Parameters:
compact- the value for thecompactrecord componentasComment- the value for theasCommentrecord componentuseVariables- the value for theuseVariablesrecord componentmodelDefaults- the value for themodelDefaultsrecord componentoptionAnnotations- the value for theoptionAnnotationsrecord componentcolumnGap- the value for thecolumnGaprecord component
-
-
Method Details
-
isOptionAnnotation
Returns whether the given annotation should be printed as an attribute option.optionAnnotationsis a list of annotations that should be printed as attribute options.
A comma separates multiple annotations.
If the annotation ends with a|, it matches only annotations without parameters.
The special annotation@*matches all annotations and@*|matches all annotations without parameters.Example:
@NotNull|, @NotZero- Parameters:
annotation- the annotation string- Returns:
- true to print as an attribute option
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
compact
-
asComment
-
useVariables
public boolean useVariables()Returns the value of theuseVariablesrecord component.- Returns:
- the value of the
useVariablesrecord component
-
modelDefaults
Returns the value of themodelDefaultsrecord component.- Returns:
- the value of the
modelDefaultsrecord component
-
optionAnnotations
Returns the value of theoptionAnnotationsrecord component.- Returns:
- the value of the
optionAnnotationsrecord component
-
columnGap
-