public final class ImmutablePersistentDir extends PersistentDir
PersistentDir.
Use the builder to create immutable instances:
ImmutablePersistentDir.builder().
Use the static factory method to create immutable instances:
ImmutablePersistentDir.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutablePersistentDir.Builder
Builds instances of type
ImmutablePersistentDir. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutablePersistentDir.Builder |
builder()
Creates a builder for
ImmutablePersistentDir. |
static ImmutablePersistentDir |
copyOf(PersistentDir instance)
Creates an immutable copy of a
PersistentDir value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutablePersistentDir that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
value. |
static ImmutablePersistentDir |
of(Path value)
Construct a new immutable
PersistentDir instance. |
Path |
value() |
ImmutablePersistentDir |
withValue(Path value)
Copy the current immutable object by setting a value for the
value attribute. |
userHome, userHomepublic Path value()
public final ImmutablePersistentDir withValue(Path value)
value attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for valuethis objectpublic boolean equals(Object another)
ImmutablePersistentDir that have equal attribute values.public int hashCode()
value.public static ImmutablePersistentDir of(Path value)
PersistentDir instance.value - The value for the value attributepublic static ImmutablePersistentDir copyOf(PersistentDir instance)
PersistentDir 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 ImmutablePersistentDir.Builder builder()
ImmutablePersistentDir.
ImmutablePersistentDir.builder()
.value(java.nio.file.Path) // required value
.build();
Copyright © 2022. All rights reserved.