Package eu.simuline.octave.type
Class OctaveFunctionHandle
- java.lang.Object
-
- eu.simuline.octave.type.OctaveFunctionHandle
-
- All Implemented Interfaces:
OctaveObject
public final class OctaveFunctionHandle extends Object implements OctaveObject
A function handle.This does for some reason not work with octave 3.0, but it works with octave 3.2.
-
-
Constructor Summary
Constructors Constructor Description OctaveFunctionHandle(String function)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFunction()
OctaveFunctionHandle
shallowCopy()
Make a shallow copy of this object.
-
-
-
Field Detail
-
function
private final String function
-
-
Constructor Detail
-
OctaveFunctionHandle
public OctaveFunctionHandle(String function)
- Parameters:
function
- A single line string like "@(x) x ** 2" or "@(a,b) a + b"
-
-
Method Detail
-
shallowCopy
public OctaveFunctionHandle shallowCopy()
Description copied from interface:OctaveObject
Make a shallow copy of this object. In general when anOctaveObject
is returned from a getter, e.g. onOctaveStruct
orOctaveStruct
, a shallow copy is returned in order to follow the way octave behaves. This method is used to make that copy.- Specified by:
shallowCopy
in interfaceOctaveObject
- Returns:
- a shallow copy of this
-
getFunction
public String getFunction()
- Returns:
- the function
-
-