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.
  • Method Details

    • file

      public java.nio.file.Path file()
      Specified by:
      file in interface MinChangesConfigurationType
      Returns:
      The changelog file
    • feedEmail

      public java.lang.String feedEmail()
      Specified by:
      feedEmail in interface MinChangesConfigurationType
      Returns:
      The email used for the changelog atom feed
    • withFile

      public final MinChangesConfiguration withFile​(java.nio.file.Path value)
      Copy the current immutable object by setting a value for the file attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for file
      Returns:
      A modified copy of the this object
    • withFeedEmail

      public final MinChangesConfiguration withFeedEmail​(java.lang.String value)
      Copy the current immutable object by setting a value for the feedEmail attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for feedEmail
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals​(java.lang.Object another)
      This instance is equal to all instances of MinChangesConfiguration that have equal attribute values.
      Overrides:
      equals in class java.lang.Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: file, feedEmail.
      Overrides:
      hashCode in class java.lang.Object
      Returns:
      hashCode value
    • toString

      public java.lang.String toString()
      Prints the immutable value MinChangesConfiguration with attribute values.
      Overrides:
      toString in class java.lang.Object
      Returns:
      A string representation of the value
    • of

      public static MinChangesConfiguration of​(java.nio.file.Path file, java.lang.String feedEmail)
      Construct a new immutable MinChangesConfiguration instance.
      Parameters:
      file - The value for the file attribute
      feedEmail - The value for the feedEmail attribute
      Returns:
      An immutable MinChangesConfiguration instance
    • copyOf

      public static MinChangesConfiguration copyOf​(MinChangesConfigurationType instance)
      Creates an immutable copy of a MinChangesConfigurationType value. 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

      public static MinChangesConfiguration.Builder builder()
      Creates a builder for MinChangesConfiguration.
       MinChangesConfiguration.builder()
          .setFile(java.nio.file.Path) // required file
          .setFeedEmail(String) // required feedEmail
          .build();
       
      Returns:
      A new MinChangesConfiguration builder