com.holonplatform.core.internal

## Class DefaultInitializer<T>

- java.lang.Object
- - com.holonplatform.core.internal.DefaultInitializer<T>

- Type Parameters:
    `T` - Type of the value to lazy initialize
  All Implemented Interfaces:
    Initializer<T>

      public class DefaultInitializer<T>
      extends Object
      implements Initializer<T>

  Default `Initializer` implementation.
  Since:
    5.0.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultInitializer(Supplier<T> initializer)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `get()` Gets the value, initializing it if the value is not already initialized before returning to caller.

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

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

    - ### Methods inherited from interface com.holonplatform.core.Initializer

      `init, using`

- - ### Constructor Detail

    - #### DefaultInitializer

          public DefaultInitializer(Supplier<T> initializer)

      Constructor
      Parameters:
        `initializer` - Value initializer (not null)

  - ### Method Detail

    - #### get

          public T get()

      Description copied from interface: `Initializer`
      Gets the value, initializing it if the value is not already initialized before returning to caller.
      Specified by:
        `get` in interface `Initializer<T>`
      Returns:
        the (lazy initialized) value

Copyright © 2019 The Holon Platform. All rights reserved.