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 classImmutableSearch.BuilderBuilds instances of typeImmutableSearch.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableSearch.Builderbuilder()Creates a builder forImmutableSearch.static ImmutableSearchcopyOf(Search instance)Creates an immutable copy of aSearchvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableSearchthat have equal attribute values.inthashCode()Computes a hash code from attributes:totalCount,incompleteResults.BooleanincompleteResults()Are returned results incompleteStringtoString()Prints the immutable valueSearchwith attribute values.IntegertotalCount()Total count of search hitsImmutableSearchwithIncompleteResults(Boolean value)Copy the current immutable object by setting a value for theincompleteResultsattribute.ImmutableSearchwithTotalCount(Integer value)Copy the current immutable object by setting a value for thetotalCountattribute.
-
-
-
Method Detail
-
totalCount
@Nullable public Integer totalCount()
Total count of search hits- Specified by:
totalCountin interfaceSearch
-
incompleteResults
@Nullable public Boolean incompleteResults()
Are returned results incomplete- Specified by:
incompleteResultsin interfaceSearch
-
withTotalCount
public final ImmutableSearch withTotalCount(@Nullable Integer value)
Copy the current immutable object by setting a value for thetotalCountattribute. 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
thisobject
-
withIncompleteResults
public final ImmutableSearch withIncompleteResults(@Nullable Boolean value)
Copy the current immutable object by setting a value for theincompleteResultsattribute. 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
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableSearchthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:totalCount,incompleteResults.
-
toString
public String toString()
Prints the immutable valueSearchwith attribute values.
-
copyOf
public static ImmutableSearch copyOf(Search instance)
Creates an immutable copy of aSearchvalue. 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) // nullabletotalCount.incompleteResults(Boolean | null) // nullableincompleteResults.build();- Returns:
- A new ImmutableSearch builder
-
-