Interface CollectionResource<T extends Resource>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getNextPageUrl()
      Returns a next page URL
      T single()
      This is just a convenience method to retrieve the single element expected to exist in this collection.
      java.util.stream.Stream<T> stream()
      Returns a sequential Stream with this collection as its source.
      • Methods inherited from interface java.lang.Iterable

        forEach, iterator, spliterator
    • Method Detail

      • single

        T single()
        This is just a convenience method to retrieve the single element expected to exist in this collection. This method is intended to be used in cases where the returned list is explicitly expected to contain a single element. This operation will throw an exception if this list contains zero or more than one element.

        This method is not backed by any specific property obtained from the backend, as already mentioned, this is a convenience method.

        Returns:
        the single unique resource that is expect to be contained within this list.
        Throws:
        java.lang.IllegalStateException - if this list contains either zero or more than one element.
      • stream

        java.util.stream.Stream<T> stream()
        Returns a sequential Stream with this collection as its source.
        Returns:
        a sequential Stream over the elements in this resource
        Since:
        1.0
      • getNextPageUrl

        java.lang.String getNextPageUrl()
        Returns a next page URL
        Returns:
        a URL link to the next resource, or null if the current resource is the last one.