EMEmvOptional Class Reference

Conforms to ObjectType
__covariant
Declared in EMEmvOptional.h

Overview

EMEmvOptional.

+ optional

Constructs an instance with the described value.

+ (instancetype)optional

Availability

5.0

Declared In

EMEmvOptional.h

+ optionalOf:

Returns an {@code EMEmvOptional} describing the given value, if non-{@code null}, otherwise returns an empty {@code EMEmvOptional}.

+ (instancetype)optionalOf:(ObjectType)aValue

Parameters

aValue

the possibly-{@code null} value to describe @param the type of the value

Return Value

an {@code EMEmvOptional} with a present value if the specified value is non-{@code null}, otherwise an empty {@code EMEmvOptional}

Declared In

EMEmvOptional.h

+ optionalOfNullable:

Returns an {@code EMEmvOptional} describing the given value, if non-{@code null}, otherwise returns an empty {@code EMEmvOptional}.

+ (instancetype)optionalOfNullable:(ObjectType)aValue

Parameters

aValue

the possibly-{@code null} value to describe @param the type of the value

Return Value

an {@code EMEmvOptional} with a present value if the specified value is non-{@code null}, otherwise an empty {@code EMEmvOptional}

Declared In

EMEmvOptional.h

– get

Returns the value if present, otherwise throws {@code NSInternalInconsistencyException}.

- (ObjectType)get

Return Value

the non-{@code null} value described by this {@code EMEmvOptional} @throws NSInternalInconsistencyException if no value is present

See Also

Declared In

EMEmvOptional.h

– isPresent

Returns {@code YES} if present, otherwise {@code NO}.

- (BOOL)isPresent

Declared In

EMEmvOptional.h

– orElse:

Returns the value if present, otherwise returns {@code ObjectType}.

- (ObjectType)orElse:(ObjectType)anOther

Parameters

anOther

the value to be returned, if no value is present. May be {@code null}.

Return Value

the value, if present, otherwise {@code ObjectType}

Declared In

EMEmvOptional.h