public final class ImmutablePackage extends Object implements Package
Package.
Use the builder to create immutable instances:
ImmutablePackage.builder().
Use the static factory method to create immutable instances:
ImmutablePackage.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutablePackage.Builder
Builds instances of type
ImmutablePackage. |
| Modifier and Type | Method and Description |
|---|---|
ArchiveType |
archiveType() |
static ImmutablePackage.Builder |
builder()
Creates a builder for
ImmutablePackage. |
static ImmutablePackage |
copyOf(Package instance)
Creates an immutable copy of a
Package value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutablePackage that have equal attribute values. |
FileSet |
fileSet() |
int |
hashCode()
Computes a hash code from attributes:
archiveType, fileSet, url, hint. |
Optional<String> |
hint() |
static ImmutablePackage |
of(ArchiveType archiveType,
FileSet fileSet,
String url)
Construct a new immutable
Package instance. |
String |
toString()
Prints the immutable value
Package with attribute values. |
String |
url() |
ImmutablePackage |
withArchiveType(ArchiveType value)
Copy the current immutable object by setting a value for the
archiveType attribute. |
ImmutablePackage |
withFileSet(FileSet value)
Copy the current immutable object by setting a value for the
fileSet attribute. |
ImmutablePackage |
withHint(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
hint attribute. |
ImmutablePackage |
withHint(String value)
Copy the current immutable object by setting a present value for the optional
hint attribute. |
ImmutablePackage |
withUrl(String value)
Copy the current immutable object by setting a value for the
url attribute. |
public ArchiveType archiveType()
archiveType in interface PackagearchiveType attributepublic FileSet fileSet()
public String url()
public final ImmutablePackage withArchiveType(ArchiveType value)
archiveType attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for archiveTypethis objectpublic final ImmutablePackage withFileSet(FileSet value)
fileSet attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for fileSetthis objectpublic final ImmutablePackage withUrl(String value)
url attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for urlthis objectpublic final ImmutablePackage withHint(String value)
hint attribute.value - The value for hintthis objectpublic final ImmutablePackage withHint(Optional<String> optional)
hint attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for hintthis objectpublic boolean equals(Object another)
ImmutablePackage that have equal attribute values.public int hashCode()
archiveType, fileSet, url, hint.public String toString()
Package with attribute values.public static ImmutablePackage of(ArchiveType archiveType, FileSet fileSet, String url)
Package instance.public static ImmutablePackage copyOf(Package instance)
Package 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 ImmutablePackage.Builder builder()
ImmutablePackage.
ImmutablePackage.builder()
.archiveType(de.flapdoodle.embed.process.distribution.ArchiveType) // required archiveType
.fileSet(de.flapdoodle.embed.process.config.store.FileSet) // required fileSet
.url(String) // required url
.hint(String) // optional hint
.build();
Copyright © 2025. All rights reserved.