Boxed

Description

sealed class Tinman.Core.Util.Boxed<T>

Helper class for boxing arbitrary values into objects.

Public / Methods

Get

2 overloads


[Pure]
public static method Get1 → (2)

box in : object

The object to unwrap.

defaultValue opt : T = default(T)

The default value to return if box in is not an instance of Boxed.

returns → T

The unwrapped value.

Unwraps the given object.


[Pure]
public static method Get2 → (2)

box in : Boxed<T>

The object to unwrap.

defaultValue opt : T = default(T)

The default value to return if box in is null.

returns → T

The unwrapped value.

Unwraps the given object.

Set


[Pure]
public static method Set → (1)

value in : T

The value to wrap.

returns → Boxed<T>

The wrapping Boxed object.

Wraps the given value in a Boxed object.