| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutablePlatform.Builder
Builds instances of type
ImmutablePlatform. |
| Modifier and Type | Method and Description |
|---|---|
Architecture |
architecture() |
static ImmutablePlatform.Builder |
builder()
Creates a builder for
ImmutablePlatform. |
static ImmutablePlatform |
copyOf(Platform instance)
Creates an immutable copy of a
Platform value. |
Optional<Distribution> |
distribution() |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutablePlatform that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
operatingSystem, architecture, distribution, version. |
OS |
operatingSystem() |
String |
toString()
Prints the immutable value
Platform with attribute values. |
Optional<Version> |
version() |
ImmutablePlatform |
withArchitecture(Architecture value)
Copy the current immutable object by setting a value for the
architecture attribute. |
ImmutablePlatform |
withDistribution(Distribution value)
Copy the current immutable object by setting a present value for the optional
distribution attribute. |
ImmutablePlatform |
withDistribution(Optional<? extends Distribution> optional)
Copy the current immutable object by setting an optional value for the
distribution attribute. |
ImmutablePlatform |
withOperatingSystem(OS value)
Copy the current immutable object by setting a value for the
operatingSystem attribute. |
ImmutablePlatform |
withVersion(Optional<? extends Version> optional)
Copy the current immutable object by setting an optional value for the
version attribute. |
ImmutablePlatform |
withVersion(Version value)
Copy the current immutable object by setting a present value for the optional
version attribute. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitdetect, detect, detectArchitecture, detectDistribution, detectOS, detectVersion, detectVersionpublic OS operatingSystem()
operatingSystem in interface PlatformoperatingSystem attributepublic Architecture architecture()
architecture in interface Platformarchitecture attributepublic Optional<Distribution> distribution()
distribution in interface Platformdistribution attributepublic final ImmutablePlatform withOperatingSystem(OS value)
operatingSystem attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for operatingSystemthis objectpublic final ImmutablePlatform withArchitecture(Architecture value)
architecture attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for architecturethis objectpublic final ImmutablePlatform withDistribution(Distribution value)
distribution attribute.value - The value for distributionthis objectpublic final ImmutablePlatform withDistribution(Optional<? extends Distribution> optional)
distribution attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for distributionthis objectpublic final ImmutablePlatform withVersion(Version value)
version attribute.value - The value for versionthis objectpublic final ImmutablePlatform withVersion(Optional<? extends Version> optional)
version attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for versionthis objectpublic boolean equals(Object another)
ImmutablePlatform that have equal attribute values.public int hashCode()
operatingSystem, architecture, distribution, version.public String toString()
Platform with attribute values.public static ImmutablePlatform copyOf(Platform instance)
Platform value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutablePlatform.Builder builder()
ImmutablePlatform.
ImmutablePlatform.builder()
.operatingSystem(de.flapdoodle.os.OS) // required operatingSystem
.architecture(de.flapdoodle.os.Architecture) // required architecture
.distribution(de.flapdoodle.os.Distribution) // optional distribution
.version(de.flapdoodle.os.Version) // optional version
.build();
Copyright © 2022. All rights reserved.