Package com.spotify.github.v3.search
Class ImmutableSearch
- java.lang.Object
-
- com.spotify.github.v3.search.ImmutableSearch
-
- All Implemented Interfaces:
Search
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableSearch extends Object implements Search
Immutable implementation ofSearch
.Use the builder to create immutable instances:
ImmutableSearch.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableSearch.Builder
Builds instances of typeImmutableSearch
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableSearch.Builder
builder()
Creates a builder forImmutableSearch
.static ImmutableSearch
copyOf(Search instance)
Creates an immutable copy of aSearch
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableSearch
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:totalCount
,incompleteResults
.Boolean
incompleteResults()
Are returned results incompleteString
toString()
Prints the immutable valueSearch
with attribute values.Integer
totalCount()
Total count of search hitsImmutableSearch
withIncompleteResults(Boolean value)
Copy the current immutable object by setting a value for theincompleteResults
attribute.ImmutableSearch
withTotalCount(Integer value)
Copy the current immutable object by setting a value for thetotalCount
attribute.
-
-
-
Method Detail
-
totalCount
@Nullable public Integer totalCount()
Total count of search hits- Specified by:
totalCount
in interfaceSearch
-
incompleteResults
@Nullable public Boolean incompleteResults()
Are returned results incomplete- Specified by:
incompleteResults
in interfaceSearch
-
withTotalCount
public final ImmutableSearch withTotalCount(@Nullable Integer value)
Copy the current immutable object by setting a value for thetotalCount
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for totalCount (can benull
)- Returns:
- A modified copy of the
this
object
-
withIncompleteResults
public final ImmutableSearch withIncompleteResults(@Nullable Boolean value)
Copy the current immutable object by setting a value for theincompleteResults
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for incompleteResults (can benull
)- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableSearch
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:totalCount
,incompleteResults
.
-
toString
public String toString()
Prints the immutable valueSearch
with attribute values.
-
copyOf
public static ImmutableSearch copyOf(Search instance)
Creates an immutable copy of aSearch
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 Search instance
-
builder
public static ImmutableSearch.Builder builder()
Creates a builder forImmutableSearch
.ImmutableSearch.builder() .totalCount(Integer | null) // nullable
totalCount
.incompleteResults(Boolean | null) // nullableincompleteResults
.build();- Returns:
- A new ImmutableSearch builder
-
-