Class MMetadata
java.lang.Object
com.io7m.montarre.api.MMetadata
- All Implemented Interfaces:
MMetadataType, MPackageElementType
Package metadata.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic MMetadata.Builderbuilder()Creates a builder forMMetadata.copying()static MMetadatacopyOf(MMetadataType instance) Creates an immutable copy of aMMetadataTypevalue.booleanThis instance is equal to all instances ofMMetadatathat have equal attribute values.flatpak()inthashCode()Computes a hash code from attributes:names,version,javaInfo,description,links,vendor,copying,longDescriptions,longDescriptionsByLanguage,categories,applicationKind,flatpak.javaInfo()links()A map of the long descriptions by language.names()toString()Prints the immutable valueMMetadatawith attribute values.vendor()version()final MMetadataCopy the current immutable object by setting a value for theapplicationKindattribute.final MMetadatawithCategories(MCategoryName... elements) Copy the current immutable object with elements that replace the content ofcategories.final MMetadatawithCategories(Iterable<? extends MCategoryName> elements) Copy the current immutable object with elements that replace the content ofcategories.final MMetadatawithCopying(MCopyingType value) Copy the current immutable object by setting a value for thecopyingattribute.final MMetadatawithDescription(MDescription value) Copy the current immutable object by setting a value for thedescriptionattribute.final MMetadatawithFlatpak(MMetadataFlatpakType value) Copy the current immutable object by setting a value for theflatpakattribute.final MMetadatawithJavaInfo(MJavaInfoType value) Copy the current immutable object by setting a value for thejavaInfoattribute.final MMetadataCopy the current immutable object with elements that replace the content oflinks.final MMetadataCopy the current immutable object with elements that replace the content oflinks.final MMetadatawithLongDescriptions(MLongDescriptionType... elements) Copy the current immutable object with elements that replace the content oflongDescriptions.final MMetadatawithLongDescriptions(Iterable<? extends MLongDescriptionType> elements) Copy the current immutable object with elements that replace the content oflongDescriptions.final MMetadatawithNames(MNamesType value) Copy the current immutable object by setting a value for thenamesattribute.final MMetadatawithVendor(MVendor value) Copy the current immutable object by setting a value for thevendorattribute.final MMetadatawithVersion(MVersion value) Copy the current immutable object by setting a value for theversionattribute.Methods inherited from interface MMetadataType
checkPreconditions
-
Method Details
-
names
- Specified by:
namesin interfaceMMetadataType- Returns:
- The package name information
-
version
- Specified by:
versionin interfaceMMetadataType- Returns:
- The package version
-
javaInfo
- Specified by:
javaInfoin interfaceMMetadataType- Returns:
- Information involving the Java runtime
-
description
- Specified by:
descriptionin interfaceMMetadataType- Returns:
- The package description
-
links
- Specified by:
linksin interfaceMMetadataType- Returns:
- The various package links.
-
vendor
- Specified by:
vendorin interfaceMMetadataType- Returns:
- The vendor
-
copying
- Specified by:
copyingin interfaceMMetadataType- Returns:
- The copyright and license information
-
longDescriptions
- Specified by:
longDescriptionsin interfaceMMetadataType- Returns:
- A long description of the application
-
longDescriptionsByLanguage
A map of the long descriptions by language.- Specified by:
longDescriptionsByLanguagein interfaceMMetadataType- Returns:
- The long descriptions by language
-
categories
- Specified by:
categoriesin interfaceMMetadataType- Returns:
- The application categories
-
applicationKind
- Specified by:
applicationKindin interfaceMMetadataType- Returns:
- The kind of the application
-
flatpak
- Specified by:
flatpakin interfaceMMetadataType- Returns:
- The flatpak-specific metadata
-
withNames
Copy the current immutable object by setting a value for thenamesattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for names- Returns:
- A modified copy or the
thisobject
-
withVersion
Copy the current immutable object by setting a value for theversionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for version- Returns:
- A modified copy or the
thisobject
-
withJavaInfo
Copy the current immutable object by setting a value for thejavaInfoattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for javaInfo- Returns:
- A modified copy or the
thisobject
-
withDescription
Copy the current immutable object by setting a value for thedescriptionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for description- Returns:
- A modified copy or the
thisobject
-
withLinks
-
withLinks
Copy the current immutable object with elements that replace the content oflinks. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of links elements to set- Returns:
- A modified copy or
thisif not changed
-
withVendor
Copy the current immutable object by setting a value for thevendorattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for vendor- Returns:
- A modified copy or the
thisobject
-
withCopying
Copy the current immutable object by setting a value for thecopyingattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for copying- Returns:
- A modified copy or the
thisobject
-
withLongDescriptions
Copy the current immutable object with elements that replace the content oflongDescriptions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withLongDescriptions
Copy the current immutable object with elements that replace the content oflongDescriptions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of longDescriptions elements to set- Returns:
- A modified copy or
thisif not changed
-
withCategories
Copy the current immutable object with elements that replace the content ofcategories.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withCategories
Copy the current immutable object with elements that replace the content ofcategories. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of categories elements to set- Returns:
- A modified copy or
thisif not changed
-
withApplicationKind
Copy the current immutable object by setting a value for theapplicationKindattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for applicationKind- Returns:
- A modified copy or the
thisobject
-
withFlatpak
Copy the current immutable object by setting a value for theflatpakattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for flatpak- Returns:
- A modified copy or the
thisobject
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aMMetadataTypevalue. 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 MMetadata instance
-
builder
Creates a builder forMMetadata.MMetadata.builder() .setNames(com.io7m.montarre.api.MNamesType) // required
names.setVersion(com.io7m.montarre.api.MVersion) // requiredversion.setJavaInfo(com.io7m.montarre.api.MJavaInfoType) // requiredjavaInfo.setDescription(com.io7m.montarre.api.MDescription) // requireddescription.addLinks|addAllLinks(com.io7m.montarre.api.MLink) //linkselements .setVendor(com.io7m.montarre.api.MVendor) // requiredvendor.setCopying(com.io7m.montarre.api.MCopyingType) // requiredcopying.addLongDescriptions|addAllLongDescriptions(com.io7m.montarre.api.MLongDescriptionType) //longDescriptionselements .addCategories|addAllCategories(com.io7m.montarre.api.MCategoryName) //categorieselements .setApplicationKind(com.io7m.montarre.api.MApplicationKind) // requiredapplicationKind.setFlatpak(com.io7m.montarre.api.MMetadataFlatpakType) // optionalflatpak.build();- Returns:
- A new MMetadata builder
-