org.qi4j.library.rest.server.api

## Class ObjectSelection

- java.lang.Object
- - org.qi4j.library.rest.server.api.ObjectSelection

-     public class ObjectSelection
      extends Object

  Manage the current object selection. An instance of ObjectSelection is created for each request, and stored as an attribute. Whenever an object is identified in the chain, add it to the selection.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ObjectSelection()` Create new root roleMap

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ObjectSelection` | `current()`
    `<T> T` | `get(Class<T> type)`
    `static void` | `newSelection()`
    `void` | `select(Object object)`
    `Iterable<Object>` | `selection()`
    `Object[]` | `toArray()`
    `static <T> T` | `type(Class<T> type)`

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

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

- - ### Constructor Detail

    - #### ObjectSelection

          public ObjectSelection()

      Create new root roleMap

  - ### Method Detail

    - #### current

          public static ObjectSelection current()

    - #### type

          public static <T> T type(Class<T> type)

    - #### newSelection

          public static void newSelection()

    - #### select

          public void select(Object object)

    - #### get

          public <T> T get(Class<T> type)
                throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### selection

          public Iterable<Object> selection()

    - #### toArray

          public Object[] toArray()