Foundations Apex API Developer Reference


global with sharing class OptionalValue

A holder for a value, so we can tell the difference between null and missing. Methods that return an fferpcore.OptionalValue return null to signify "missing" or "unknown". They return new OptionalValue(null) to signify an explicit null.



global OptionalValue(Object value)

Construct an fferpcore.OptionalValue with the given value.

Input Parameters

Name Type Description
value Object The data of the OptionValue.


global Object getValue()

Return Value

The data of the OptionalValue.


global Boolean hasNonNullValue()

Return Value

True of the Optional has a non-null value.


global Boolean equals(Object other)

Two OptionalValues are equal if their contents are equal. *

Input Parameters

Name Type Description
other Object The object to compare against.

Return Value

True of they are equal.

© Copyright 2009–2023 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.