Class MLongDescription
java.lang.Object
com.io7m.montarre.api.MLongDescription
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic MLongDescription.Builderbuilder()Creates a builder forMLongDescription.static MLongDescriptioncopyOf(MLongDescriptionType instance) Creates an immutable copy of aMLongDescriptionTypevalue.booleanThis instance is equal to all instances ofMLongDescriptionthat have equal attribute values.features()inthashCode()Computes a hash code from attributes:language,descriptions,features.language()toString()Prints the immutable valueMLongDescriptionwith attribute values.final MLongDescriptionwithDescriptions(MParagraph... elements) Copy the current immutable object with elements that replace the content ofdescriptions.final MLongDescriptionwithDescriptions(Iterable<? extends MParagraph> elements) Copy the current immutable object with elements that replace the content ofdescriptions.final MLongDescriptionwithFeatures(MFeature... elements) Copy the current immutable object with elements that replace the content offeatures.final MLongDescriptionwithFeatures(Iterable<? extends MFeature> elements) Copy the current immutable object with elements that replace the content offeatures.final MLongDescriptionwithLanguage(MLanguageCode value) Copy the current immutable object by setting a value for thelanguageattribute.
-
Method Details
-
language
- Specified by:
languagein interfaceMLongDescriptionType- Returns:
- The description language
-
descriptions
- Specified by:
descriptionsin interfaceMLongDescriptionType- Returns:
- The description paragraphs
-
features
- Specified by:
featuresin interfaceMLongDescriptionType- Returns:
- The feature list
-
withLanguage
Copy the current immutable object by setting a value for thelanguageattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for language- Returns:
- A modified copy of the
thisobject
-
withDescriptions
Copy the current immutable object with elements that replace the content ofdescriptions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withDescriptions
Copy the current immutable object with elements that replace the content ofdescriptions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of descriptions elements to set- Returns:
- A modified copy of
thisobject
-
withFeatures
Copy the current immutable object with elements that replace the content offeatures.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withFeatures
Copy the current immutable object with elements that replace the content offeatures. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of features elements to set- Returns:
- A modified copy of
thisobject
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aMLongDescriptionTypevalue. 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
Creates a builder forMLongDescription.MLongDescription.builder() .setLanguage(com.io7m.montarre.api.MLanguageCode) // optionallanguage.addDescriptions|addAllDescriptions(com.io7m.montarre.api.MParagraph) //descriptionselements .addFeatures|addAllFeatures(com.io7m.montarre.api.MFeature) //featureselements .build();- Returns:
- A new MLongDescription builder
-