Class ASFilenameMetadata
java.lang.Object
com.io7m.coffeepick.shipilev_net.internal.ASFilenameMetadata
- All Implemented Interfaces:
ASFilenameMetadataType
public final class ASFilenameMetadata extends java.lang.Object implements ASFilenameMetadataType
Information parsed from shipilev.net filenames.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ASFilenameMetadata.Builder
Builds instances of typeASFilenameMetadata
. -
Method Summary
Modifier and Type Method Description java.lang.String
architecture()
java.util.Optional<RuntimeBuild>
build()
static ASFilenameMetadata.Builder
builder()
Creates a builder forASFilenameMetadata
.static ASFilenameMetadata
copyOf(ASFilenameMetadataType instance)
Creates an immutable copy of aASFilenameMetadataType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofASFilenameMetadata
that have equal attribute values.java.util.Set<java.lang.String>
extraTags()
int
hashCode()
Computes a hash code from attributes:version
,architecture
,platform
,build
,extraTags
.java.lang.String
platform()
java.lang.String
toString()
Prints the immutable valueASFilenameMetadata
with attribute values.RuntimeVersion
version()
ASFilenameMetadata
withArchitecture(java.lang.String value)
Copy the current immutable object by setting a value for thearchitecture
attribute.ASFilenameMetadata
withBuild(RuntimeBuild value)
Copy the current immutable object by setting a present value for the optionalbuild
attribute.ASFilenameMetadata
withBuild(java.util.Optional<? extends RuntimeBuild> optional)
Copy the current immutable object by setting an optional value for thebuild
attribute.ASFilenameMetadata
withExtraTags(java.lang.Iterable<java.lang.String> elements)
Copy the current immutable object with elements that replace the content ofextraTags
.ASFilenameMetadata
withExtraTags(java.lang.String... elements)
Copy the current immutable object with elements that replace the content ofextraTags
.ASFilenameMetadata
withPlatform(java.lang.String value)
Copy the current immutable object by setting a value for theplatform
attribute.ASFilenameMetadata
withVersion(RuntimeVersion value)
Copy the current immutable object by setting a value for theversion
attribute.
-
Method Details
-
version
- Specified by:
version
in interfaceASFilenameMetadataType
- Returns:
- The version
-
architecture
public java.lang.String architecture()- Specified by:
architecture
in interfaceASFilenameMetadataType
- Returns:
- The architecture
-
platform
public java.lang.String platform()- Specified by:
platform
in interfaceASFilenameMetadataType
- Returns:
- The operating system
-
build
- Specified by:
build
in interfaceASFilenameMetadataType
- Returns:
- The build information
-
extraTags
public java.util.Set<java.lang.String> extraTags()- Specified by:
extraTags
in interfaceASFilenameMetadataType
- Returns:
- The extra tags for the build
-
withVersion
Copy the current immutable object by setting a value for theversion
attribute. 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 of the
this
object
-
withArchitecture
Copy the current immutable object by setting a value for thearchitecture
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for architecture- Returns:
- A modified copy of the
this
object
-
withPlatform
Copy the current immutable object by setting a value for theplatform
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for platform- Returns:
- A modified copy of the
this
object
-
withBuild
Copy the current immutable object by setting a present value for the optionalbuild
attribute.- Parameters:
value
- The value for build- Returns:
- A modified copy of
this
object
-
withBuild
Copy the current immutable object by setting an optional value for thebuild
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for build- Returns:
- A modified copy of
this
object
-
withExtraTags
Copy the current immutable object with elements that replace the content ofextraTags
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withExtraTags
Copy the current immutable object with elements that replace the content ofextraTags
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of extraTags elements to set- Returns:
- A modified copy of
this
object
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofASFilenameMetadata
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()Computes a hash code from attributes:version
,architecture
,platform
,build
,extraTags
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueASFilenameMetadata
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aASFilenameMetadataType
value. 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 ASFilenameMetadata instance
-
builder
Creates a builder forASFilenameMetadata
.ASFilenameMetadata.builder() .setVersion(com.io7m.coffeepick.runtime.RuntimeVersion) // required
version
.setArchitecture(String) // requiredarchitecture
.setPlatform(String) // requiredplatform
.setBuild(com.io7m.coffeepick.runtime.RuntimeBuild) // optionalbuild
.addExtraTags|addAllExtraTags(String) //extraTags
elements .build();- Returns:
- A new ASFilenameMetadata builder
-