Table of Contents

Class UnaryOperator<TObject>

Namespace
Java.Util.Function
Assembly
MASES.JNet.dll
public class UnaryOperator<TObject> : UnaryOperator, IDynamicMetaObjectProvider, IJVMBridgeCore, IEquatable<IJVMBridgeBaseInstance>, IDisposable, IJVMBridgeBaseStatic, IUnaryOperator<TObject>, IJVMBridgeBase, IJVMBridgeBaseInstance, IJVMBridgeDefinition

Type Parameters

TObject

The data type associated to the event

Inheritance
UnaryOperator<TObject>
Implements
Derived
Inherited Members
Extension Methods

Constructors

UnaryOperator()

Initialize a new instance of UnaryOperator<TObject>

public UnaryOperator()

Properties

OnApply

The Func<T, TResult> to be executed

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

Property Value

Func<TObject, TObject>

OnApplyDispose

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

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

Property Value

Action<TObject>

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(TObject)

Executes the UnaryOperator action in the CLR

public virtual TObject Apply(TObject obj)

Parameters

obj TObject

The UnaryOperator object

Returns

TObject

The apply TObject