Class ImmutableEntriesResponse

    • Method Detail

      • hasMore

        public boolean hasMore()
        Whether there are more result-items than returned by this response object.

        If there are more result-items, the value returned by getToken() can be used in the next invocation to get the next "page" of results.

        Specified by:
        hasMore in interface PaginatedResponse
        Returns:
        true, if there are more result items.
      • getToken

        @Nullable
        public String getToken()
        Pass this value to the next invocation of the API function to get the next page of results.

        Paging tokens are opaque and the structure may change without prior notice even in patch releases.

        Specified by:
        getToken in interface PaginatedResponse
        Returns:
        paging-token for the next invocation of an API function, if hasMore() is true. Undefined, if hasMore() is false.
      • withHasMore

        public final ImmutableEntriesResponse withHasMore​(boolean value)
        Copy the current immutable object by setting a value for the hasMore attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for hasMore
        Returns:
        A modified copy of the this object
      • withToken

        public final ImmutableEntriesResponse withToken​(@Nullable
                                                        String value)
        Copy the current immutable object by setting a value for the token attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for token (can be null)
        Returns:
        A modified copy of the this object
      • withEntries

        public final ImmutableEntriesResponse withEntries​(EntriesResponse.Entry... elements)
        Copy the current immutable object with elements that replace the content of entries.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withEntries

        public final ImmutableEntriesResponse withEntries​(Iterable<? extends EntriesResponse.Entry> elements)
        Copy the current immutable object with elements that replace the content of entries. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of entries elements to set
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableEntriesResponse that have equal attribute values.
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Returns a precomputed-on-construction hash code from attributes: hasMore, token, entries.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

        public String toString()
        Prints the immutable value EntriesResponse with attribute values.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the value
      • copyOf

        public static ImmutableEntriesResponse copyOf​(EntriesResponse instance)
        Creates an immutable copy of a EntriesResponse 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 EntriesResponse instance
      • builder

        public static ImmutableEntriesResponse.Builder builder()
        Creates a builder for ImmutableEntriesResponse.
         ImmutableEntriesResponse.builder()
            .hasMore(boolean) // optional hasMore
            .token(String | null) // nullable token
            .addEntries|addAllEntries(org.projectnessie.model.EntriesResponse.Entry) // entries elements
            .build();
         
        Returns:
        A new ImmutableEntriesResponse builder