ObjectHolder (Groovy 5.0.8)
Description: declaration: package: org.apache.groovy.util, class: ObjectHolder

Package org.apache.groovy.util

# Class ObjectHolder<T>

java.lang.Object
org.apache.groovy.util.ObjectHolder<T>

Type Parameters:
  `T` - the type of object

public class ObjectHolder<T> extends Object
Just hold an object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ObjectHolder()`
  `ObjectHolder(T object)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `T`
  `getObject()`
  `T`
  `getObject(Supplier<? extends T> def)`
  `void`
  `setObject(T object)`

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

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

- ## Constructor Details

  - ### ObjectHolder

    public ObjectHolder()

  - ### ObjectHolder

    public ObjectHolder(T object)

- ## Method Details

  - ### getObject

    public T getObject()

  - ### getObject

    public T getObject(Supplier<? extends T> def)

  - ### setObject

    public void setObject(T object)