Package org.eclipse.emf.spi.cdo

## Class InternalCDOView.ViewAndState

- java.lang.Object
- - org.eclipse.emf.spi.cdo.InternalCDOView.ViewAndState

- Enclosing interface:
    InternalCDOView

      public static final class InternalCDOView.ViewAndState
      extends java.lang.Object

  Optimizes the storage of `CDOObject.cdoView()` and `CDOObject.cdoState()`. All objects of a view share a small number of `CDOState` literals, so they are moved into a final AbstractCDOView.viewAndStates array. For the `TRANSIENT` state, where there is no view associated with a `CDOObject`, this class maintains a static `VIEW_AND_STATES` array.
  Since:
    4.2
  Author:
    Eike Stepper

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `CDOState` | `state` |
    `static InternalCDOView.ViewAndState` | `TRANSIENT` |
    `InternalCDOView` | `view` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ViewAndState​(InternalCDOView view, CDOState state)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static InternalCDOView.ViewAndState[]` | `create​(InternalCDOView view)` |
    `InternalCDOView.ViewAndState` | `getViewAndState​(CDOState state)` |
    `java.lang.String` | `toString()` |

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

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

- - ### Field Detail

    - #### TRANSIENT

          public static final InternalCDOView.ViewAndState TRANSIENT

    - #### view

          public final InternalCDOView view

    - #### state

          public final CDOState state

  - ### Constructor Detail

    - #### ViewAndState

          public ViewAndState​(InternalCDOView view,
                              CDOState state)

  - ### Method Detail

    - #### getViewAndState

          public InternalCDOView.ViewAndState getViewAndState​(CDOState state)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### create

          public static InternalCDOView.ViewAndState[] create​(InternalCDOView view)