Table of Contents

Class DoubleFunction<TReturn>

Namespace
Java.Util.Function
Assembly
MASES.JNet.dll
public class DoubleFunction<TReturn> : DoubleFunction, IDynamicMetaObjectProvider, IJVMBridgeCore, IEquatable<IJVMBridgeBaseInstance>, IDisposable, IJVMBridgeBaseStatic, IDoubleFunction<TReturn>, IJVMBridgeBase, IJVMBridgeBaseInstance, IJVMBridgeDefinition

Type Parameters

TReturn

The return data type associated to the event

Inheritance
DoubleFunction<TReturn>
Implements
Derived
Inherited Members
Extension Methods

Constructors

DoubleFunction(Func<double, TReturn>, bool)

Initialize a new instance of DoubleFunction<TReturn>

public DoubleFunction(Func<double, TReturn> func = null, bool attachEventHandler = true)

Parameters

func Func<double, TReturn>
attachEventHandler bool

Properties

OnApply

The Func<T, TResult> to be executed

public virtual Func<double, TReturn> OnApply { get; set; }

Property Value

Func<double, TReturn>

OnApplyDispose

Optional handler invoked after the event handler returns, to dispose the JVM object returned by this event.

public Action<TReturn> OnApplyDispose { get; set; }

Property Value

Action<TReturn>

Remarks

Set OnApplyDispose when the event handler returns a JVM-backed object that is no longer needed after the call. The handler receives the return value and is responsible for calling Dispose() on it, releasing the underlying JVM global reference immediately instead of waiting for the .NET garbage collector to finalize it. If not set, the return value is not disposed automatically.

Methods

Apply(double)

Executes the DoubleFunction action in the CLR

public virtual TReturn Apply(double obj)

Parameters

obj double

The DoubleFunction object

Returns

TReturn

The apply TReturn