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:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.singularsys.jep.functions.ZeroLengthBehaviourI
ZeroLengthBehaviourI.DefaultZeroLengthBehaviourI, ZeroLengthBehaviourI.ZeroLengthErrorBehaviour, ZeroLengthBehaviourI.ZeroLengthHelper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets how to respond to arguments with zero length arrays.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.voidsetZeroLengthBehaviourAndValue(ZeroLengthBehaviourI zeroLengthHelper) Sets the zero length error behaviour and value from anotherZeroLengthBehaviourIinstance.voidsetZeroLengthErrorBehaviour(ZeroLengthBehaviourI.ZeroLengthErrorBehaviour zeroLengthErrorBehaviour) Sets how to respond to arguments with zero length arrays.voidsetZeroLengthValue(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, waitMethods inherited from interface com.singularsys.jep.functions.ZeroLengthBehaviourI
getErrorMessage, getValueOrException, zeroLengthResultOrException
-
Constructor Details
-
ZeroLengthHelper
public ZeroLengthHelper()
-
-
Method Details
-
getZeroLengthErrorBehaviour
Description copied from interface:ZeroLengthBehaviourIGets how to respond to arguments with zero length arrays.- Specified by:
getZeroLengthErrorBehaviourin interfaceZeroLengthBehaviourI- Returns:
- either EXCEPTION, NAN or VALUE
-
setZeroLengthErrorBehaviour
public void setZeroLengthErrorBehaviour(ZeroLengthBehaviourI.ZeroLengthErrorBehaviour zeroLengthErrorBehaviour) Description copied from interface:ZeroLengthBehaviourISets how to respond to arguments with zero length arrays. Either an Exception is thrown or NaN is returned.- Specified by:
setZeroLengthErrorBehaviourin interfaceZeroLengthBehaviourI- Parameters:
zeroLengthErrorBehaviour- either EXCEPTION, NAN or VALUE
-
getZeroLengthValue
Description copied from interface:ZeroLengthBehaviourIGets 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:
getZeroLengthValuein interfaceZeroLengthBehaviourI- Returns:
- the value, null by default
-
setZeroLengthValue
Description copied from interface:ZeroLengthBehaviourISets the value to be returned when a zero length array is passed and the zero length error behaviour is set to VALUE. TheZeroLengthBehaviourI.setZeroLengthErrorBehaviour(ZeroLengthErrorBehaviour)method should be used to set the zero length error behaviour to VALUE.- Specified by:
setZeroLengthValuein interfaceZeroLengthBehaviourI- Parameters:
zeroLengthValue- the value to return when a zero length array is passed
-
setZeroLengthBehaviourAndValue
Sets the zero length error behaviour and value from anotherZeroLengthBehaviourIinstance.- Parameters:
zeroLengthHelper- the instance to copy from
-