@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableTransactionTimerSnapshot extends Object implements TransactionTimer.TransactionTimerSnapshot
TransactionTimer.TransactionTimerSnapshot.
Use the builder to create immutable instances:
ImmutableTransactionTimerSnapshot.builder().
Use the static factory method to create immutable instances:
ImmutableTransactionTimerSnapshot.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableTransactionTimerSnapshot.Builder
Builds instances of type
ImmutableTransactionTimerSnapshot. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
active() |
static ImmutableTransactionTimerSnapshot.Builder |
builder()
Creates a builder for
ImmutableTransactionTimerSnapshot. |
static ImmutableTransactionTimerSnapshot |
copyOf(TransactionTimer.TransactionTimerSnapshot instance)
Creates an immutable copy of a
TransactionTimer.TransactionTimerSnapshot value. |
long |
count() |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableTransactionTimerSnapshot that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
totalNanos, count, active. |
static ImmutableTransactionTimerSnapshot |
of(long totalNanos,
long count,
boolean active)
Construct a new immutable
TransactionTimerSnapshot instance. |
String |
toString()
Prints the immutable value
TransactionTimerSnapshot with attribute values. |
long |
totalNanos() |
ImmutableTransactionTimerSnapshot |
withActive(boolean value)
Copy the current immutable object by setting a value for the
active attribute. |
ImmutableTransactionTimerSnapshot |
withCount(long value)
Copy the current immutable object by setting a value for the
count attribute. |
ImmutableTransactionTimerSnapshot |
withTotalNanos(long value)
Copy the current immutable object by setting a value for the
totalNanos attribute. |
public boolean active()
active in interface TransactionTimer.TransactionTimerSnapshotactive attributepublic static ImmutableTransactionTimerSnapshot.Builder builder()
ImmutableTransactionTimerSnapshot.
ImmutableTransactionTimerSnapshot.builder()
.totalNanos(long) // required totalNanos
.count(long) // required count
.active(boolean) // required active
.build();
public static ImmutableTransactionTimerSnapshot copyOf(TransactionTimer.TransactionTimerSnapshot instance)
TransactionTimer.TransactionTimerSnapshot 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 long count()
count in interface TransactionTimer.TransactionTimerSnapshotcount attributepublic boolean equals(@Nullable Object another)
ImmutableTransactionTimerSnapshot that have equal attribute values.public int hashCode()
totalNanos, count, active.public static ImmutableTransactionTimerSnapshot of(long totalNanos, long count, boolean active)
TransactionTimerSnapshot instance.totalNanos - The value for the totalNanos attributecount - The value for the count attributeactive - The value for the active attributepublic String toString()
TransactionTimerSnapshot with attribute values.public long totalNanos()
totalNanos in interface TransactionTimer.TransactionTimerSnapshottotalNanos attributepublic final ImmutableTransactionTimerSnapshot withActive(boolean value)
active attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for activethis objectpublic final ImmutableTransactionTimerSnapshot withCount(long value)
count attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for countthis objectpublic final ImmutableTransactionTimerSnapshot withTotalNanos(long value)
totalNanos attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for totalNanosthis objectCopyright © 2011–2020 Glowroot contributors. All rights reserved.