HERE Android SDK Developer's Guide

MediaCollectionPage<T>

The class MediaCollectionPage<T> is a member of com.here.android.mpa.search .

Type Parameters:

  • T

Class Summary

public final class MediaCollectionPage

extends java.lang.Object

Represents a base class for a paginateable collection of Media objects of a specific type.

[For complete information, see the section Class Details]

Method Summary

Table 1. Methods in MediaCollectionPage<T>
Methods

public boolean equals (Object obj)

For documentation, see java.lang.Object

public int getAvailable ()

Gets the total number of available Media items within the MediaCollectionPage .

public java.util.List <Media> getItems ()

Gets the list of Media items from the current page of the collection.

public MediaCollectionPageRequest<T> getNextPageRequest ()

Gets the MediaCollectionPageRequest%3CT%3E for requesting the next page of the MediaCollectionPage .

public int getOffsetCount ()

Gets the collection offset count for the current page of the MediaCollectionPage .

public Type getType ()

Gets the specialized Media.Type for the Media objects contained within the MediaCollectionPage .

public int hashCode ()

For documentation, see java.lang.Object

public boolean removeItem (Media item)

Remove Media items from the current page of the collection.

Class Details

Represents a base class for a paginateable collection of Media objects of a specific type.

Note: each collection contains objects of one Media.Type.

Method Details

public boolean equals (Object obj)

For documentation, see java.lang.Object

Parameters:

  • obj

public int getAvailable ()

Gets the total number of available Media items within the MediaCollectionPage .

Returns:

The number of available items

public java.util.List <Media> getItems ()

Gets the list of Media items from the current page of the collection. The type of each object in the list depends on the MediaCollectionPage .

Note: if a collection is empty, the items attribute is not present and this method will return empty .

Returns:

The list of Media objects (could be empty)

public MediaCollectionPageRequest<T> getNextPageRequest ()

Gets the MediaCollectionPageRequest%3CT%3E for requesting the next page of the MediaCollectionPage .

Returns:

The MediaCollectionPageRequest

public int getOffsetCount ()

Gets the collection offset count for the current page of the MediaCollectionPage .

For the first page of results, the offset count is 0. Following any call to getNextPageRequest(), the offset count will be greater than 0.

Returns:

The collection offset count

public Type getType ()

Gets the specialized Media.Type for the Media objects contained within the MediaCollectionPage .

Returns:

The Media.Type

public int hashCode ()

For documentation, see java.lang.Object

public boolean removeItem (Media item)

Remove Media items from the current page of the collection.

Parameters:

  • item

    The Media item to be removed from the current collection page.

Returns:

Returns true if the Media object is successfully removed from the page.