@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableTimeOfDay extends Object implements TimeOfDay
TimeOfDay
.
Use the builder to create immutable instances:
ImmutableTimeOfDay.builder()
.
Modifier and Type | Class and Description |
---|---|
static class |
ImmutableTimeOfDay.Builder
Builds instances of type
ImmutableTimeOfDay . |
Modifier and Type | Method and Description |
---|---|
static ImmutableTimeOfDay.Builder |
builder()
Creates a builder for
ImmutableTimeOfDay . |
static ImmutableTimeOfDay |
copyOf(TimeOfDay instance)
Creates an immutable copy of a
TimeOfDay value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableTimeOfDay that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
hour , minute . |
int |
hour()
Specifies an (0-23) hour in a day.
|
int |
minute()
Specifies a (0-59) minute in an hour.
|
String |
toString()
Prints the immutable value
TimeOfDay with attribute values. |
ImmutableTimeOfDay |
withHour(int value)
Copy the current immutable object by setting a value for the
hour attribute. |
ImmutableTimeOfDay |
withMinute(int value)
Copy the current immutable object by setting a value for the
minute attribute. |
public int minute()
public final ImmutableTimeOfDay withHour(int value)
hour
attribute.
A value equality check is used to prevent copying of the same value by returning this
.value
- A new value for hourthis
objectpublic final ImmutableTimeOfDay withMinute(int value)
minute
attribute.
A value equality check is used to prevent copying of the same value by returning this
.value
- A new value for minutethis
objectpublic boolean equals(@Nullable Object another)
ImmutableTimeOfDay
that have equal attribute values.public int hashCode()
hour
, minute
.public String toString()
TimeOfDay
with attribute values.public static ImmutableTimeOfDay copyOf(TimeOfDay instance)
TimeOfDay
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 ImmutableTimeOfDay.Builder builder()
ImmutableTimeOfDay
.
ImmutableTimeOfDay.builder() .hour(int) // requiredhour
.minute(int) // requiredminute
.build();
Copyright © 2023 iland Internet Solutions, Corp. All rights reserved.