Foundations Apex API Developer Reference

fferpcore.OptionalValue

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.

Methods

OptionalValue

global OptionalValue(Object value)

Construct an fferpcore.OptionalValue with the given value.

Input Parameters

Name Type Description
value Object The data of the OptionValue.

getValue

global Object getValue()

Return Value

The data of the OptionalValue.

hasNonNullValue

global Boolean hasNonNullValue()

Return Value

True of the Optional has a non-null value.

equals

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–2024 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.