Package com.singularsys.jep.functions

# Class ZeroLengthBehaviourI.ZeroLengthHelper

java.lang.Object
com.singularsys.jep.functions.ZeroLengthBehaviourI.ZeroLengthHelper

All Implemented Interfaces:
  `ZeroLengthBehaviourI`, `Serializable`

Enclosing interface:
  `ZeroLengthBehaviourI`

public static class ZeroLengthBehaviourI.ZeroLengthHelper extends Object implements ZeroLengthBehaviourI
Helper class which implements the zero length behaviour.

Since:
  Jep 4.1
See Also:
  - Serialized Form

- ## Nested Class Summary

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

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ZeroLengthHelper()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ZeroLengthBehaviourI.ZeroLengthErrorBehaviour`
  `getZeroLengthErrorBehaviour()`
  Gets how to respond to arguments with zero length arrays.
  `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.
  `void`
  `setZeroLengthBehaviourAndValue(ZeroLengthBehaviourI zeroLengthHelper)`
  Sets the zero length error behaviour and value from another `ZeroLengthBehaviourI` instance.
  `void`
  `setZeroLengthErrorBehaviour(ZeroLengthBehaviourI.ZeroLengthErrorBehaviour zeroLengthErrorBehaviour)`
  Sets how to respond to arguments with zero length arrays.
  `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 class java.lang.Object

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

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

  `getErrorMessage, getValueOrException, zeroLengthResultOrException`

- ## Constructor Details

  - ### ZeroLengthHelper

    public ZeroLengthHelper()

- ## Method Details

  - ### getZeroLengthErrorBehaviour

    public 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

    public 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

    public 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

    public 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

  - ### setZeroLengthBehaviourAndValue

    public void setZeroLengthBehaviourAndValue(ZeroLengthBehaviourI zeroLengthHelper)
    Sets the zero length error behaviour and value from another `ZeroLengthBehaviourI` instance.
    Parameters:
      `zeroLengthHelper` - the instance to copy from