com.holonplatform.vaadin.navigator.internal

## Enum DefaultViewConfigurationCache

- java.lang.Object
- - java.lang.Enum<DefaultViewConfigurationCache>
  - - com.holonplatform.vaadin.navigator.internal.DefaultViewConfigurationCache

- All Implemented Interfaces:
    ViewConfigurationCache, Serializable, Comparable<DefaultViewConfigurationCache>

      public enum DefaultViewConfigurationCache
      extends Enum<DefaultViewConfigurationCache>
      implements ViewConfigurationCache

  Default `ViewConfigurationCache` implementation
  Since:
    5.0.0

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `INSTANCE` Singleton instance

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearCache()` Clear cache
    `ViewConfiguration` | `getViewConfiguration(Class<? extends com.vaadin.navigator.View> viewClass)` Get cached view configuration
    `boolean` | `hasViewConfiguration(Class<? extends com.vaadin.navigator.View> viewClass)` Check if cache contains a view configuration associated to given `viewClass`
    `ViewConfiguration` | `storeViewConfiguration(Class<? extends com.vaadin.navigator.View> viewClass, ViewConfiguration viewConfiguration)` Put given `viewConfiguration` associated to view class if not already present in cache.
    `static DefaultViewConfigurationCache` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static DefaultViewConfigurationCache[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### INSTANCE

          public static final DefaultViewConfigurationCache INSTANCE

      Singleton instance

  - ### Method Detail

    - #### values

          public static DefaultViewConfigurationCache[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (DefaultViewConfigurationCache c : DefaultViewConfigurationCache.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static DefaultViewConfigurationCache valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### hasViewConfiguration

          public boolean hasViewConfiguration(Class<? extends com.vaadin.navigator.View> viewClass)

      Description copied from interface: `ViewConfigurationCache`
      Check if cache contains a view configuration associated to given `viewClass`
      Specified by:
        `hasViewConfiguration` in interface `ViewConfigurationCache`
      Parameters:
        `viewClass` - View class
      Returns:
        `true` if cache contains a view configuration associated to given `viewClass`

    - #### clearCache

          public void clearCache()

      Description copied from interface: `ViewConfigurationCache`
      Clear cache
      Specified by:
        `clearCache` in interface `ViewConfigurationCache`

    - #### getViewConfiguration

          public ViewConfiguration getViewConfiguration(Class<? extends com.vaadin.navigator.View> viewClass)

      Description copied from interface: `ViewConfigurationCache`
      Get cached view configuration
      Specified by:
        `getViewConfiguration` in interface `ViewConfigurationCache`
      Parameters:
        `viewClass` - View class
      Returns:
        ViewConfiguration associated to given view class, or `null` if it is not present in cache

    - #### storeViewConfiguration

          public ViewConfiguration storeViewConfiguration(Class<? extends com.vaadin.navigator.View> viewClass,
                                                          ViewConfiguration viewConfiguration)

      Description copied from interface: `ViewConfigurationCache`
      Put given `viewConfiguration` associated to view class if not already present in cache.
      Specified by:
        `storeViewConfiguration` in interface `ViewConfigurationCache`
      Parameters:
        `viewClass` - View class
        `viewConfiguration` - View configuration to store in cache
      Returns:
        If a view configuration for the view class was already in cache, this will be returned. Otherwise, new stored configuration is returned.

Copyright © 2019 The Holon Platform. All rights reserved.