Package com.singularsys.jep.functions

# Interface ZeroLengthBehaviourI.DefaultZeroLengthBehaviourI

All Superinterfaces:
  `Serializable`, `ZeroLengthBehaviourI`

All Known Implementing Classes:
  `Get`

Enclosing interface:
  `ZeroLengthBehaviourI`

public static interface ZeroLengthBehaviourI.DefaultZeroLengthBehaviourI extends ZeroLengthBehaviourI
Interface for classes which implement `ZeroLengthBehaviourI` by delegating to a helper class.

Since:
  Jep 4.1

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface com.singularsys.jep.functions.ZeroLengthBehaviourI

  `ZeroLengthBehaviourI.DefaultZeroLengthBehaviourI, ZeroLengthBehaviourI.ZeroLengthErrorBehaviour, ZeroLengthBehaviourI.ZeroLengthHelper`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default ZeroLengthBehaviourI.ZeroLengthErrorBehaviour`
  `getZeroLengthErrorBehaviour()`
  Gets how to respond to arguments with zero length arrays.
  `ZeroLengthBehaviourI`
  `getZeroLengthHelper()`
  Gets the helper class which implements the zero length behaviour.
  `default Object`
  `getZeroLengthValue()`
  Gets the value to be returned when a zero length array is passed as an argument and the zero length error behaviour is set to VALUE.
  `default void`
  `setZeroLengthErrorBehaviour(ZeroLengthBehaviourI.ZeroLengthErrorBehaviour zeroLengthErrorBehaviour)`
  Sets how to respond to arguments with zero length arrays.
  `default void`
  `setZeroLengthValue(Object zeroLengthValue)`
  Sets the value to be returned when a zero length array is passed and the zero length error behaviour is set to VALUE.

  ### Methods inherited from interface com.singularsys.jep.functions.ZeroLengthBehaviourI

  `getErrorMessage, getValueOrException, zeroLengthResultOrException`

- ## Method Details

  - ### getZeroLengthHelper

    ZeroLengthBehaviourI getZeroLengthHelper()
    Gets the helper class which implements the zero length behaviour. The standard implementation is:

        ZeroLengthHelper zeroLengthHelper = new ZeroLengthHelper();
        @Override
        public ZeroLengthBehaviourI getZeroLengthHelper() {
            return zeroLengthHelper;
        }

    Returns:
      the helper class

  - ### getZeroLengthErrorBehaviour

    default ZeroLengthBehaviourI.ZeroLengthErrorBehaviour getZeroLengthErrorBehaviour()
    Description copied from interface: `ZeroLengthBehaviourI`
    Gets how to respond to arguments with zero length arrays.
    Specified by:
      `getZeroLengthErrorBehaviour` in interface `ZeroLengthBehaviourI`
    Returns:
      either EXCEPTION, NAN or VALUE

  - ### setZeroLengthErrorBehaviour

    default void setZeroLengthErrorBehaviour(ZeroLengthBehaviourI.ZeroLengthErrorBehaviour zeroLengthErrorBehaviour)
    Description copied from interface: `ZeroLengthBehaviourI`
    Sets how to respond to arguments with zero length arrays. Either an Exception is thrown or NaN is returned.
    Specified by:
      `setZeroLengthErrorBehaviour` in interface `ZeroLengthBehaviourI`
    Parameters:
      `zeroLengthErrorBehaviour` - either EXCEPTION, NAN or VALUE

  - ### getZeroLengthValue

    default Object getZeroLengthValue()
    Description copied from interface: `ZeroLengthBehaviourI`
    Gets the value to be returned when a zero length array is passed as an argument and the zero length error behaviour is set to VALUE.
    Specified by:
      `getZeroLengthValue` in interface `ZeroLengthBehaviourI`
    Returns:
      the value, null by default

  - ### setZeroLengthValue

    default void setZeroLengthValue(Object zeroLengthValue)
    Description copied from interface: `ZeroLengthBehaviourI`
    Sets the value to be returned when a zero length array is passed and the zero length error behaviour is set to VALUE. The `ZeroLengthBehaviourI.setZeroLengthErrorBehaviour(ZeroLengthErrorBehaviour)` method should be used to set the zero length error behaviour to VALUE.
    Specified by:
      `setZeroLengthValue` in interface `ZeroLengthBehaviourI`
    Parameters:
      `zeroLengthValue` - the value to return when a zero length array is passed