Package com.io7m.montarre.api
Class MMetadata.Builder
java.lang.Object
com.io7m.montarre.api.MMetadata.Builder
- Enclosing class:
MMetadata
-
Method Summary
Modifier and TypeMethodDescriptionfinal MMetadata.BuilderaddAllCategories(Iterable<? extends MCategoryName> elements) Adds elements tocategoriesset.final MMetadata.BuilderaddAllLinks(Iterable<? extends MLink> elements) Adds elements tolinksset.final MMetadata.BuilderaddAllLongDescriptions(Iterable<? extends MLongDescriptionType> elements) Adds elements tolongDescriptionslist.final MMetadata.BuilderaddCategories(MCategoryName element) Adds one element tocategoriesset.final MMetadata.BuilderaddCategories(MCategoryName... elements) Adds elements tocategoriesset.final MMetadata.BuilderAdds one element tolinksset.final MMetadata.BuilderAdds elements tolinksset.final MMetadata.BuilderaddLongDescriptions(MLongDescriptionType element) Adds one element tolongDescriptionslist.final MMetadata.BuilderaddLongDescriptions(MLongDescriptionType... elements) Adds elements tolongDescriptionslist.build()Builds a newMMetadata.final MMetadata.Builderfrom(MMetadataType instance) Fill a builder with attribute values from the providedMMetadataTypeinstance.final MMetadata.BuildersetApplicationKind(MApplicationKind applicationKind) Initializes the value for theapplicationKindattribute.final MMetadata.BuildersetCategories(Iterable<? extends MCategoryName> elements) Sets or replaces all elements forcategoriesset.final MMetadata.BuildersetCopying(MCopyingType copying) Initializes the value for thecopyingattribute.final MMetadata.BuildersetDescription(MDescription description) Initializes the value for thedescriptionattribute.final MMetadata.BuildersetFlatpak(MMetadataFlatpakType flatpak) Initializes the value for theflatpakattribute.final MMetadata.BuildersetJavaInfo(MJavaInfoType javaInfo) Initializes the value for thejavaInfoattribute.final MMetadata.BuilderSets or replaces all elements forlinksset.final MMetadata.BuildersetLongDescriptions(Iterable<? extends MLongDescriptionType> elements) Sets or replaces all elements forlongDescriptionslist.final MMetadata.BuildersetNames(MNamesType names) Initializes the value for thenamesattribute.final MMetadata.BuilderInitializes the value for thevendorattribute.final MMetadata.BuildersetVersion(MVersion version) Initializes the value for theversionattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedMMetadataTypeinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setNames
Initializes the value for thenamesattribute.- Parameters:
names- The value for names- Returns:
thisbuilder for use in a chained invocation
-
setVersion
Initializes the value for theversionattribute.- Parameters:
version- The value for version- Returns:
thisbuilder for use in a chained invocation
-
setJavaInfo
Initializes the value for thejavaInfoattribute.- Parameters:
javaInfo- The value for javaInfo- Returns:
thisbuilder for use in a chained invocation
-
setDescription
Initializes the value for thedescriptionattribute.- Parameters:
description- The value for description- Returns:
thisbuilder for use in a chained invocation
-
addLinks
Adds one element tolinksset.- Parameters:
element- A links element- Returns:
thisbuilder for use in a chained invocation
-
addLinks
Adds elements tolinksset.- Parameters:
elements- An array of links elements- Returns:
thisbuilder for use in a chained invocation
-
setLinks
Sets or replaces all elements forlinksset.- Parameters:
elements- An iterable of links elements- Returns:
thisbuilder for use in a chained invocation
-
addAllLinks
Adds elements tolinksset.- Parameters:
elements- An iterable of links elements- Returns:
thisbuilder for use in a chained invocation
-
setVendor
Initializes the value for thevendorattribute.- Parameters:
vendor- The value for vendor- Returns:
thisbuilder for use in a chained invocation
-
setCopying
Initializes the value for thecopyingattribute.- Parameters:
copying- The value for copying- Returns:
thisbuilder for use in a chained invocation
-
addLongDescriptions
Adds one element tolongDescriptionslist.- Parameters:
element- A longDescriptions element- Returns:
thisbuilder for use in a chained invocation
-
addLongDescriptions
Adds elements tolongDescriptionslist.- Parameters:
elements- An array of longDescriptions elements- Returns:
thisbuilder for use in a chained invocation
-
setLongDescriptions
public final MMetadata.Builder setLongDescriptions(Iterable<? extends MLongDescriptionType> elements) Sets or replaces all elements forlongDescriptionslist.- Parameters:
elements- An iterable of longDescriptions elements- Returns:
thisbuilder for use in a chained invocation
-
addAllLongDescriptions
public final MMetadata.Builder addAllLongDescriptions(Iterable<? extends MLongDescriptionType> elements) Adds elements tolongDescriptionslist.- Parameters:
elements- An iterable of longDescriptions elements- Returns:
thisbuilder for use in a chained invocation
-
addCategories
Adds one element tocategoriesset.- Parameters:
element- A categories element- Returns:
thisbuilder for use in a chained invocation
-
addCategories
Adds elements tocategoriesset.- Parameters:
elements- An array of categories elements- Returns:
thisbuilder for use in a chained invocation
-
setCategories
Sets or replaces all elements forcategoriesset.- Parameters:
elements- An iterable of categories elements- Returns:
thisbuilder for use in a chained invocation
-
addAllCategories
Adds elements tocategoriesset.- Parameters:
elements- An iterable of categories elements- Returns:
thisbuilder for use in a chained invocation
-
setApplicationKind
Initializes the value for theapplicationKindattribute.- Parameters:
applicationKind- The value for applicationKind- Returns:
thisbuilder for use in a chained invocation
-
setFlatpak
Initializes the value for theflatpakattribute.If not set, this attribute will have a default value as returned by the initializer of
flatpak.- Parameters:
flatpak- The value for flatpak- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newMMetadata.- Returns:
- An immutable instance of MMetadata
- Throws:
IllegalStateException- if any required attributes are missing
-