Package com.singularsys.jep.misc

# Class OneShotComponent

java.lang.Object
com.singularsys.jep.misc.OneShotComponent

All Implemented Interfaces:
  `JepComponent`, `Serializable`

Direct Known Subclasses:
  `DictionaryComponents`, `FunctionSet`

public abstract class OneShotComponent extends Object implements JepComponent
Components are are initialised only once. On the first call to `init(Jep)`, the method `firstInit(Jep)` is called. On subsequent calls, `firstInit(Jep)` is not called.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OneShotComponent()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract void`
  `firstInit(Jep jep)`
  `JepComponent`
  `getLightWeightInstance()`
  Since the component is only initialised once, there is no need for a light weight instance.
  `final void`
  `init(Jep jep)`
  Initialize the component.

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

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

- ## Constructor Details

  - ### OneShotComponent

    public OneShotComponent()

- ## Method Details

  - ### init

    public final void init(Jep jep)
    Description copied from interface: `JepComponent`
    Initialize the component. This method is called whenever a component is added to Jep. Hence, it allows components to keep track of the other components they may rely on.
    Specified by:
      `init` in interface `JepComponent`
    Parameters:
      `jep` - the current Jep instance

  - ### firstInit

    public abstract void firstInit(Jep jep)

  - ### getLightWeightInstance

    public JepComponent getLightWeightInstance()
    Since the component is only initialised once, there is no need for a light weight instance.
    Specified by:
      `getLightWeightInstance` in interface `JepComponent`
    Returns:
      null