| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutablePercent.Builder
Builds instances of type
ImmutablePercent. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutablePercent.Builder |
builder()
Creates a builder for
ImmutablePercent. |
static ImmutablePercent |
copyOf(Percent instance)
Creates an immutable copy of a
Percent value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutablePercent that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
value. |
static ImmutablePercent |
of(int value)
Construct a new immutable
Percent instance. |
String |
toString()
Prints the immutable value
Percent with attribute values. |
int |
value() |
ImmutablePercent |
withValue(int value)
Copy the current immutable object by setting a value for the
value attribute. |
public int value()
public final ImmutablePercent withValue(int value)
value attribute.
A value 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)
ImmutablePercent that have equal attribute values.public int hashCode()
value.public String toString()
Percent with attribute values.public static ImmutablePercent of(int value)
Percent instance.value - The value for the value attributepublic static ImmutablePercent copyOf(Percent instance)
Percent 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 ImmutablePercent.Builder builder()
ImmutablePercent.
ImmutablePercent.builder()
.value(int) // required value
.build();
Copyright © 2025. All rights reserved.