public final class ImmutableSystemProperty extends Object implements SystemProperty
SystemProperty.
Use the builder to create immutable instances:
ImmutableSystemProperty.builder().
Use the static factory method to create immutable instances:
ImmutableSystemProperty.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableSystemProperty.Builder
Builds instances of type
ImmutableSystemProperty. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableSystemProperty.Builder |
builder()
Creates a builder for
ImmutableSystemProperty. |
static ImmutableSystemProperty |
copyOf(SystemProperty instance)
Creates an immutable copy of a
SystemProperty value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableSystemProperty that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
name. |
String |
name() |
static ImmutableSystemProperty |
of(String name)
Construct a new immutable
SystemProperty instance. |
String |
toString()
Prints the immutable value
SystemProperty with attribute values. |
ImmutableSystemProperty |
withName(String value)
Copy the current immutable object by setting a value for the
name attribute. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitanypublic String name()
name in interface SystemPropertyname attributepublic final ImmutableSystemProperty withName(String value)
name attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for namethis objectpublic boolean equals(Object another)
ImmutableSystemProperty that have equal attribute values.public int hashCode()
name.public String toString()
SystemProperty with attribute values.public static ImmutableSystemProperty of(String name)
SystemProperty instance.name - The value for the name attributepublic static ImmutableSystemProperty copyOf(SystemProperty instance)
SystemProperty 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 ImmutableSystemProperty.Builder builder()
ImmutableSystemProperty.
ImmutableSystemProperty.builder()
.name(String) // required name
.build();
Copyright © 2021. All rights reserved.