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 classImmutableStatItem.BuilderBuilds instances of typeImmutableStatItem.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Integeradditions()static ImmutableStatItem.Builderbuilder()Creates a builder forImmutableStatItem.static ImmutableStatItemcopyOf(StatItem instance)Creates an immutable copy of aStatItemvalue.Integerdeletions()booleanequals(Object another)This instance is equal to all instances ofImmutableStatItemthat have equal attribute values.inthashCode()Computes a hash code from attributes:total,additions,deletions.StringtoString()Prints the immutable valueStatItemwith attribute values.Integertotal()ImmutableStatItemwithAdditions(Integer value)Copy the current immutable object by setting a value for theadditionsattribute.ImmutableStatItemwithDeletions(Integer value)Copy the current immutable object by setting a value for thedeletionsattribute.ImmutableStatItemwithTotal(Integer value)Copy the current immutable object by setting a value for thetotalattribute.
-
-
-
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 thetotalattribute. 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
thisobject
-
withAdditions
public final ImmutableStatItem withAdditions(@Nullable Integer value)
Copy the current immutable object by setting a value for theadditionsattribute. 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
thisobject
-
withDeletions
public final ImmutableStatItem withDeletions(@Nullable Integer value)
Copy the current immutable object by setting a value for thedeletionsattribute. 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
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableStatItemthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:total,additions,deletions.
-
toString
public String toString()
Prints the immutable valueStatItemwith attribute values.
-
copyOf
public static ImmutableStatItem copyOf(StatItem instance)
Creates an immutable copy of aStatItemvalue. 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) // nullabletotal.additions(Integer | null) // nullableadditions.deletions(Integer | null) // nullabledeletions.build();- Returns:
- A new ImmutableStatItem builder
-
-