Package com.io7m.minisite.core
Class MinChangesConfiguration
java.lang.Object
com.io7m.minisite.core.MinChangesConfiguration
- All Implemented Interfaces:
MinChangesConfigurationType
public final class MinChangesConfiguration extends java.lang.Object implements MinChangesConfigurationType
Configurations for changelogs.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMinChangesConfiguration.BuilderBuilds instances of typeMinChangesConfiguration. -
Method Summary
Modifier and Type Method Description static MinChangesConfiguration.Builderbuilder()Creates a builder forMinChangesConfiguration.static MinChangesConfigurationcopyOf(MinChangesConfigurationType instance)Creates an immutable copy of aMinChangesConfigurationTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofMinChangesConfigurationthat have equal attribute values.java.lang.StringfeedEmail()java.nio.file.Pathfile()inthashCode()Computes a hash code from attributes:file,feedEmail.static MinChangesConfigurationof(java.nio.file.Path file, java.lang.String feedEmail)Construct a new immutableMinChangesConfigurationinstance.java.lang.StringtoString()Prints the immutable valueMinChangesConfigurationwith attribute values.MinChangesConfigurationwithFeedEmail(java.lang.String value)Copy the current immutable object by setting a value for thefeedEmailattribute.MinChangesConfigurationwithFile(java.nio.file.Path value)Copy the current immutable object by setting a value for thefileattribute.
-
Method Details
-
file
public java.nio.file.Path file()- Specified by:
filein interfaceMinChangesConfigurationType- Returns:
- The changelog file
-
feedEmail
public java.lang.String feedEmail()- Specified by:
feedEmailin interfaceMinChangesConfigurationType- Returns:
- The email used for the changelog atom feed
-
withFile
Copy the current immutable object by setting a value for thefileattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for file- Returns:
- A modified copy of the
thisobject
-
withFeedEmail
Copy the current immutable object by setting a value for thefeedEmailattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for feedEmail- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofMinChangesConfigurationthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:file,feedEmail.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueMinChangesConfigurationwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
Construct a new immutableMinChangesConfigurationinstance.- Parameters:
file- The value for thefileattributefeedEmail- The value for thefeedEmailattribute- Returns:
- An immutable MinChangesConfiguration instance
-
copyOf
Creates an immutable copy of aMinChangesConfigurationTypevalue. 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 MinChangesConfiguration instance
-
builder
Creates a builder forMinChangesConfiguration.MinChangesConfiguration.builder() .setFile(java.nio.file.Path) // requiredfile.setFeedEmail(String) // requiredfeedEmail.build();- Returns:
- A new MinChangesConfiguration builder
-