com.h3c.util.type

## Class Page<R extends PageRequest,D>

- java.lang.Object
- - com.h3c.util.type.Page<R,D>

- Type Parameters:
    `R` - type of the page request.
    `D` - type of the data.
  All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    MarkPage

      public class Page<R extends PageRequest,D>
      extends Object
      implements Serializable

  Generic Data page.

  Note: D is not forced to be serializable, so in order to properly serialize a Page the type of data must be serializable. D was not marked as Serializable on purpose so the page can hold non serializable objects.

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Page(R pageRequest, List<D> data)` Creates a data page.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<D>` | `getData()` Gets the page data.
    `R` | `getRequest()` Gets the request that generated this page.
    `boolean` | `isEmpty()` Returns `true` if the page is empty, `false` otherwise.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Page

          public Page(R pageRequest,
              List<D> data)

      Creates a data page.
      Parameters:
        `pageRequest` - request that generated this page.
        `data` - page's data.

  - ### Method Detail

    - #### getData

          public List<D> getData()

      Gets the page data.
      Returns:
        the page data.

    - #### getRequest

          public R getRequest()

      Gets the request that generated this page.
      Returns:
        the request that generated this page.

    - #### isEmpty

          public boolean isEmpty()

      Returns `true` if the page is empty, `false` otherwise.
      Returns:
        `true` if the page is empty, `false` otherwise.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2014. All Rights Reserved.