Class MLongDescription

java.lang.Object
com.io7m.montarre.api.MLongDescription
All Implemented Interfaces:
MLongDescriptionType

public final class MLongDescription extends Object implements MLongDescriptionType
A long description of the application.
  • Method Details

    • language

      public MLanguageCode language()
      Specified by:
      language in interface MLongDescriptionType
      Returns:
      The description language
    • descriptions

      public List<MParagraph> descriptions()
      Specified by:
      descriptions in interface MLongDescriptionType
      Returns:
      The description paragraphs
    • features

      public List<MFeature> features()
      Specified by:
      features in interface MLongDescriptionType
      Returns:
      The feature list
    • withLanguage

      public final MLongDescription withLanguage(MLanguageCode value)
      Copy the current immutable object by setting a value for the language attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for language
      Returns:
      A modified copy of the this object
    • withDescriptions

      public final MLongDescription withDescriptions(MParagraph... elements)
      Copy the current immutable object with elements that replace the content of descriptions.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withDescriptions

      public final MLongDescription withDescriptions(Iterable<? extends MParagraph> elements)
      Copy the current immutable object with elements that replace the content of descriptions. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of descriptions elements to set
      Returns:
      A modified copy of this object
    • withFeatures

      public final MLongDescription withFeatures(MFeature... elements)
      Copy the current immutable object with elements that replace the content of features.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withFeatures

      public final MLongDescription withFeatures(Iterable<? extends MFeature> elements)
      Copy the current immutable object with elements that replace the content of features. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of features elements to set
      Returns:
      A modified copy of this object
    • equals

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

      public int hashCode()
      Computes a hash code from attributes: language, descriptions, features.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static MLongDescription copyOf(MLongDescriptionType instance)
      Creates an immutable copy of a MLongDescriptionType 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 MLongDescription instance
    • builder

      public static MLongDescription.Builder builder()
      Creates a builder for MLongDescription.
       MLongDescription.builder()
          .setLanguage(com.io7m.montarre.api.MLanguageCode) // optional language
          .addDescriptions|addAllDescriptions(com.io7m.montarre.api.MParagraph) // descriptions elements
          .addFeatures|addAllFeatures(com.io7m.montarre.api.MFeature) // features elements
          .build();
       
      Returns:
      A new MLongDescription builder