Class MPackageDeclaration
java.lang.Object
com.io7m.montarre.api.MPackageDeclaration
- All Implemented Interfaces:
MPackageDeclarationType
A package.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeMPackageDeclaration. -
Method Summary
Modifier and TypeMethodDescriptionstatic MPackageDeclaration.Builderbuilder()Creates a builder forMPackageDeclaration.static MPackageDeclarationcopyOf(MPackageDeclarationType instance) Creates an immutable copy of aMPackageDeclarationTypevalue.booleanThis instance is equal to all instances ofMPackageDeclarationthat have equal attribute values.inthashCode()Computes a hash code from attributes:metadata,manifest.manifest()metadata()toString()Prints the immutable valueMPackageDeclarationwith attribute values.final MPackageDeclarationwithManifest(MManifestType value) Copy the current immutable object by setting a value for themanifestattribute.final MPackageDeclarationwithMetadata(MMetadataType value) Copy the current immutable object by setting a value for themetadataattribute.
-
Method Details
-
metadata
- Specified by:
metadatain interfaceMPackageDeclarationType- Returns:
- The package metadata
-
manifest
- Specified by:
manifestin interfaceMPackageDeclarationType- Returns:
- The package manifest
-
withMetadata
Copy the current immutable object by setting a value for themetadataattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for metadata- Returns:
- A modified copy or the
thisobject
-
withManifest
Copy the current immutable object by setting a value for themanifestattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for manifest- Returns:
- A modified copy or the
thisobject
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aMPackageDeclarationTypevalue. 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 MPackageDeclaration instance
-
builder
Creates a builder forMPackageDeclaration.MPackageDeclaration.builder() .setMetadata(com.io7m.montarre.api.MMetadataType) // required
metadata.setManifest(com.io7m.montarre.api.MManifestType) // requiredmanifest.build();- Returns:
- A new MPackageDeclaration builder
-