LazyInitializable (Groovy 5.1.0)

Package: org.apache.groovy.util.concurrent

## [Java] Interface LazyInitializable

-     public interface LazyInitializable

  A `LazyInitializable` is an object that can be initialized lazily. Note: the instance field `initialized` of subclass should be `volatile` to avoid JVM instructions re-ordering

  Since:
    3.0.0

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `doInit()` do initialization
    `` | `public boolean` | `isInitialized()` Check if the object is initialized.
    `` | `public void` | `lazyInit()`
    `` | `public void` | `setInitialized(boolean initialized)` Mark the object initialized.

- - ### Method Detail

    - #### public void doInit()

      do initialization

    - #### public boolean isInitialized()

      Check if the object is initialized.

      Returns:
        the check result

    - #### public void lazyInit()

    - #### public void setInitialized(boolean initialized)

      Mark the object initialized.

      Parameters:
        `initialized` - initialized