Package com.spotify.github.v3.search
Class ImmutableSearchRepositories
- java.lang.Object
-
- com.spotify.github.v3.search.ImmutableSearchRepositories
-
- All Implemented Interfaces:
Search
,SearchRepositories
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableSearchRepositories extends Object implements SearchRepositories
Immutable implementation ofSearchRepositories
.Use the builder to create immutable instances:
ImmutableSearchRepositories.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableSearchRepositories.Builder
Builds instances of typeImmutableSearchRepositories
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableSearchRepositories.Builder
builder()
Creates a builder forImmutableSearchRepositories
.static ImmutableSearchRepositories
copyOf(SearchRepositories instance)
Creates an immutable copy of aSearchRepositories
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableSearchRepositories
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:totalCount
,incompleteResults
,items
.Boolean
incompleteResults()
Are returned results incompleteList<Repository>
items()
Repositories search resultsString
toString()
Prints the immutable valueSearchRepositories
with attribute values.Integer
totalCount()
Total count of search hitsImmutableSearchRepositories
withIncompleteResults(Boolean value)
Copy the current immutable object by setting a value for theincompleteResults
attribute.ImmutableSearchRepositories
withItems(Repository... elements)
Copy the current immutable object with elements that replace the content ofitems
.ImmutableSearchRepositories
withItems(Iterable<? extends Repository> elements)
Copy the current immutable object with elements that replace the content ofitems
.ImmutableSearchRepositories
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
-
items
@Nullable public List<Repository> items()
Repositories search results- Specified by:
items
in interfaceSearchRepositories
-
withTotalCount
public final ImmutableSearchRepositories 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 ImmutableSearchRepositories 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
-
withItems
public final ImmutableSearchRepositories withItems(@Nullable Repository... elements)
Copy the current immutable object with elements that replace the content ofitems
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withItems
public final ImmutableSearchRepositories withItems(@Nullable Iterable<? extends Repository> elements)
Copy the current immutable object with elements that replace the content ofitems
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of items elements to set- Returns:
- A modified copy of
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableSearchRepositories
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:totalCount
,incompleteResults
,items
.
-
toString
public String toString()
Prints the immutable valueSearchRepositories
with attribute values.
-
copyOf
public static ImmutableSearchRepositories copyOf(SearchRepositories instance)
Creates an immutable copy of aSearchRepositories
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 SearchRepositories instance
-
builder
public static ImmutableSearchRepositories.Builder builder()
Creates a builder forImmutableSearchRepositories
.ImmutableSearchRepositories.builder() .totalCount(Integer | null) // nullable
totalCount
.incompleteResults(Boolean | null) // nullableincompleteResults
.items(List<com.spotify.github.v3.repos.Repository> | null) // nullableitems
.build();- Returns:
- A new ImmutableSearchRepositories builder
-
-