@Generated(value="org.immutables.processor.ProxyProcessor") public final class ImmutableTabSize extends Object implements TabSize
TabSize.
Use the builder to create immutable instances:
ImmutableTabSize.builder().
Use the static factory method to create immutable instances:
ImmutableTabSize.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableTabSize.Builder
Builds instances of type
ImmutableTabSize. |
| Modifier and Type | Method and Description |
|---|---|
String |
asSpaces()
Returns a lazily initialized value of the
asSpaces attribute. |
static ImmutableTabSize.Builder |
builder()
Creates a builder for
ImmutableTabSize. |
static ImmutableTabSize |
copyOf(TabSize instance)
Creates an immutable copy of a
TabSize value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableTabSize that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
spaces. |
static ImmutableTabSize |
of(int spaces)
Construct a new immutable
TabSize instance. |
int |
spaces() |
String |
toString()
Prints the immutable value
TabSize with attribute values. |
ImmutableTabSize |
withSpaces(int value)
Copy the current immutable object by setting a value for the
spaces attribute. |
public int spaces()
public final ImmutableTabSize withSpaces(int value)
spaces attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for spacesthis objectpublic boolean equals(Object another)
ImmutableTabSize that have equal attribute values.public int hashCode()
spaces.public String toString()
TabSize with attribute values.public String asSpaces()
Returns a lazily initialized value of the asSpaces attribute.
Initialized once and only once and stored for subsequent access with proper synchronization.
In case of any exception or error thrown by the lazy value initializer,
the result will not be memoised (i.e. remembered) and on next call computation
will be attempted again.
public static ImmutableTabSize of(int spaces)
TabSize instance.spaces - The value for the spaces attributepublic static ImmutableTabSize copyOf(TabSize instance)
TabSize 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 ImmutableTabSize.Builder builder()
ImmutableTabSize.
ImmutableTabSize.builder()
.spaces(int) // required spaces
.build();
Copyright © 2022. All rights reserved.