Class MEARuntime
java.lang.Object
com.io7m.montarre.adoptium.MEARuntime
- All Implemented Interfaces:
MEARuntimeType
An Adoptium runtime.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic MEARuntime.Builderbuilder()Creates a builder forMEARuntime.static MEARuntimecopyOf(MEARuntimeType instance) Creates an immutable copy of aMEARuntimeTypevalue.booleanThis instance is equal to all instances ofMEARuntimethat have equal attribute values.format()hash()inthashCode()Computes a hash code from attributes:hash,downloadLink,size,architecture,operatingSystem,format,version.longsize()toString()Prints the immutable valueMEARuntimewith attribute values.version()final MEARuntimeCopy the current immutable object by setting a value for thearchitectureattribute.final MEARuntimewithDownloadLink(URI value) Copy the current immutable object by setting a value for thedownloadLinkattribute.final MEARuntimewithFormat(MArchiveFormat value) Copy the current immutable object by setting a value for theformatattribute.final MEARuntimeCopy the current immutable object by setting a value for thehashattribute.final MEARuntimeCopy the current immutable object by setting a value for theoperatingSystemattribute.final MEARuntimewithSize(long value) Copy the current immutable object by setting a value for thesizeattribute.final MEARuntimewithVersion(Runtime.Version value) Copy the current immutable object by setting a value for theversionattribute.
-
Method Details
-
hash
- Specified by:
hashin interfaceMEARuntimeType- Returns:
- The checksum of the remote file
-
downloadLink
- Specified by:
downloadLinkin interfaceMEARuntimeType- Returns:
- The download link
-
size
public long size()- Specified by:
sizein interfaceMEARuntimeType- Returns:
- The size of the remote file
-
architecture
- Specified by:
architecturein interfaceMEARuntimeType- Returns:
- The hardware architecture of the remote file
-
operatingSystem
- Specified by:
operatingSystemin interfaceMEARuntimeType- Returns:
- The operating system of the remote file
-
format
- Specified by:
formatin interfaceMEARuntimeType- Returns:
- The format type
-
version
- Specified by:
versionin interfaceMEARuntimeType- Returns:
- The runtime version
-
withHash
Copy the current immutable object by setting a value for thehashattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hash- Returns:
- A modified copy or the
thisobject
-
withDownloadLink
Copy the current immutable object by setting a value for thedownloadLinkattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for downloadLink- Returns:
- A modified copy or the
thisobject
-
withSize
Copy the current immutable object by setting a value for thesizeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for size- Returns:
- A modified copy or the
thisobject
-
withArchitecture
Copy the current immutable object by setting a value for thearchitectureattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for architecture- Returns:
- A modified copy or the
thisobject
-
withOperatingSystem
Copy the current immutable object by setting a value for theoperatingSystemattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for operatingSystem- Returns:
- A modified copy or the
thisobject
-
withFormat
Copy the current immutable object by setting a value for theformatattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for format- 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
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aMEARuntimeTypevalue. 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 MEARuntime instance
-
builder
Creates a builder forMEARuntime.MEARuntime.builder() .setHash(com.io7m.montarre.api.MHash) // required
hash.setDownloadLink(java.net.URI) // requireddownloadLink.setSize(long) // requiredsize.setArchitecture(com.io7m.montarre.api.MArchitectureName) // requiredarchitecture.setOperatingSystem(com.io7m.montarre.api.MOperatingSystemName) // requiredoperatingSystem.setFormat(com.io7m.montarre.api.MArchiveFormat) // requiredformat.setVersion(Runtime.Version) // requiredversion.build();- Returns:
- A new MEARuntime builder
-