Package com.io7m.changelog.text.api
Class CPlainChangelogWriterConfiguration
java.lang.Object
com.io7m.changelog.text.api.CPlainChangelogWriterConfiguration
- All Implemented Interfaces:
CPlainChangelogWriterConfigurationType
public final class CPlainChangelogWriterConfiguration extends java.lang.Object implements CPlainChangelogWriterConfigurationType
The type of configurations for plain text writers.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCPlainChangelogWriterConfiguration.BuilderBuilds instances of typeCPlainChangelogWriterConfiguration. -
Method Summary
Modifier and Type Method Description static CPlainChangelogWriterConfiguration.Builderbuilder()Creates a builder forCPlainChangelogWriterConfiguration.static CPlainChangelogWriterConfigurationcopyOf(CPlainChangelogWriterConfigurationType instance)Creates an immutable copy of aCPlainChangelogWriterConfigurationTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofCPlainChangelogWriterConfigurationthat have equal attribute values.inthashCode()Computes a hash code from attributes:showDates.static CPlainChangelogWriterConfigurationof(boolean showDates)Construct a new immutableCPlainChangelogWriterConfigurationinstance.booleanshowDates()java.lang.StringtoString()Prints the immutable valueCPlainChangelogWriterConfigurationwith attribute values.CPlainChangelogWriterConfigurationwithShowDates(boolean value)Copy the current immutable object by setting a value for theshowDatesattribute.
-
Method Details
-
showDates
public boolean showDates()- Specified by:
showDatesin interfaceCPlainChangelogWriterConfigurationType- Returns:
trueif dates should be shown in the output
-
withShowDates
Copy the current immutable object by setting a value for theshowDatesattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for showDates- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofCPlainChangelogWriterConfigurationthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:showDates.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueCPlainChangelogWriterConfigurationwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
Construct a new immutableCPlainChangelogWriterConfigurationinstance.- Parameters:
showDates- The value for theshowDatesattribute- Returns:
- An immutable CPlainChangelogWriterConfiguration instance
-
copyOf
public static CPlainChangelogWriterConfiguration copyOf(CPlainChangelogWriterConfigurationType instance)Creates an immutable copy of aCPlainChangelogWriterConfigurationTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable CPlainChangelogWriterConfiguration instance
-
builder
Creates a builder forCPlainChangelogWriterConfiguration.CPlainChangelogWriterConfiguration.builder() .setShowDates(boolean) // optionalshowDates.build();- Returns:
- A new CPlainChangelogWriterConfiguration builder
-