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 classASFilenameMetadata.BuilderBuilds instances of typeASFilenameMetadata. -
Method Summary
Modifier and Type Method Description java.lang.Stringarchitecture()java.util.Optional<RuntimeBuild>build()static ASFilenameMetadata.Builderbuilder()Creates a builder forASFilenameMetadata.static ASFilenameMetadatacopyOf(ASFilenameMetadataType instance)Creates an immutable copy of aASFilenameMetadataTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofASFilenameMetadatathat have equal attribute values.java.util.Set<java.lang.String>extraTags()inthashCode()Computes a hash code from attributes:version,architecture,platform,build,extraTags.java.lang.Stringplatform()java.lang.StringtoString()Prints the immutable valueASFilenameMetadatawith attribute values.RuntimeVersionversion()ASFilenameMetadatawithArchitecture(java.lang.String value)Copy the current immutable object by setting a value for thearchitectureattribute.ASFilenameMetadatawithBuild(RuntimeBuild value)Copy the current immutable object by setting a present value for the optionalbuildattribute.ASFilenameMetadatawithBuild(java.util.Optional<? extends RuntimeBuild> optional)Copy the current immutable object by setting an optional value for thebuildattribute.ASFilenameMetadatawithExtraTags(java.lang.Iterable<java.lang.String> elements)Copy the current immutable object with elements that replace the content ofextraTags.ASFilenameMetadatawithExtraTags(java.lang.String... elements)Copy the current immutable object with elements that replace the content ofextraTags.ASFilenameMetadatawithPlatform(java.lang.String value)Copy the current immutable object by setting a value for theplatformattribute.ASFilenameMetadatawithVersion(RuntimeVersion value)Copy the current immutable object by setting a value for theversionattribute.
-
Method Details
-
version
- Specified by:
versionin interfaceASFilenameMetadataType- Returns:
- The version
-
architecture
public java.lang.String architecture()- Specified by:
architecturein interfaceASFilenameMetadataType- Returns:
- The architecture
-
platform
public java.lang.String platform()- Specified by:
platformin interfaceASFilenameMetadataType- Returns:
- The operating system
-
build
- Specified by:
buildin interfaceASFilenameMetadataType- Returns:
- The build information
-
extraTags
public java.util.Set<java.lang.String> extraTags()- Specified by:
extraTagsin interfaceASFilenameMetadataType- Returns:
- The extra tags for the build
-
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 of the
thisobject
-
withArchitecture
Copy the current immutable object by setting a value for thearchitectureattribute. 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
thisobject
-
withPlatform
Copy the current immutable object by setting a value for theplatformattribute. 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
thisobject
-
withBuild
Copy the current immutable object by setting a present value for the optionalbuildattribute.- Parameters:
value- The value for build- Returns:
- A modified copy of
thisobject
-
withBuild
Copy the current immutable object by setting an optional value for thebuildattribute. 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
thisobject
-
withExtraTags
Copy the current immutable object with elements that replace the content ofextraTags.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
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
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofASFilenameMetadatathat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:version,architecture,platform,build,extraTags.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueASFilenameMetadatawith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aASFilenameMetadataTypevalue. 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) // requiredversion.setArchitecture(String) // requiredarchitecture.setPlatform(String) // requiredplatform.setBuild(com.io7m.coffeepick.runtime.RuntimeBuild) // optionalbuild.addExtraTags|addAllExtraTags(String) //extraTagselements .build();- Returns:
- A new ASFilenameMetadata builder
-