Package com.spotify.github.v3.git
Class ImmutableStatItem
- java.lang.Object
-
- com.spotify.github.v3.git.ImmutableStatItem
-
- All Implemented Interfaces:
StatItem
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableStatItem extends Object implements StatItem
Immutable implementation ofStatItem
.Use the builder to create immutable instances:
ImmutableStatItem.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableStatItem.Builder
Builds instances of typeImmutableStatItem
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
additions()
static ImmutableStatItem.Builder
builder()
Creates a builder forImmutableStatItem
.static ImmutableStatItem
copyOf(StatItem instance)
Creates an immutable copy of aStatItem
value.Integer
deletions()
boolean
equals(Object another)
This instance is equal to all instances ofImmutableStatItem
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:total
,additions
,deletions
.String
toString()
Prints the immutable valueStatItem
with attribute values.Integer
total()
ImmutableStatItem
withAdditions(Integer value)
Copy the current immutable object by setting a value for theadditions
attribute.ImmutableStatItem
withDeletions(Integer value)
Copy the current immutable object by setting a value for thedeletions
attribute.ImmutableStatItem
withTotal(Integer value)
Copy the current immutable object by setting a value for thetotal
attribute.
-
-
-
Method Detail
-
total
@Nullable public Integer total()
-
additions
@Nullable public Integer additions()
-
deletions
@Nullable public Integer deletions()
-
withTotal
public final ImmutableStatItem withTotal(@Nullable Integer value)
Copy the current immutable object by setting a value for thetotal
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for total (can benull
)- Returns:
- A modified copy of the
this
object
-
withAdditions
public final ImmutableStatItem withAdditions(@Nullable Integer value)
Copy the current immutable object by setting a value for theadditions
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for additions (can benull
)- Returns:
- A modified copy of the
this
object
-
withDeletions
public final ImmutableStatItem withDeletions(@Nullable Integer value)
Copy the current immutable object by setting a value for thedeletions
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for deletions (can benull
)- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableStatItem
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:total
,additions
,deletions
.
-
toString
public String toString()
Prints the immutable valueStatItem
with attribute values.
-
copyOf
public static ImmutableStatItem copyOf(StatItem instance)
Creates an immutable copy of aStatItem
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable StatItem instance
-
builder
public static ImmutableStatItem.Builder builder()
Creates a builder forImmutableStatItem
.ImmutableStatItem.builder() .total(Integer | null) // nullable
total
.additions(Integer | null) // nullableadditions
.deletions(Integer | null) // nullabledeletions
.build();- Returns:
- A new ImmutableStatItem builder
-
-