ConditionalValue<TValue> Class

  • java.lang.Object
    • microsoft.servicefabric.data.ConditionalValue<TValue>

Type Parameters

TValue

Value to initialize the result with.

public class ConditionalValue

Result class returned by DistributedCollections APIs that may or may not return a value.

Constructor Summary

Constructor Description
ConditionalValue(boolean hasValue, TValue value)

Initializes a new instance of the ConditionalValue class with the given value.

Method Summary

Modifier and Type Method and Description
TValue getValue()

Gets the value.

boolean hasValue()

Gets a value indicating whether the value is valid.

Constructor Details

ConditionalValue

public ConditionalValue(boolean hasValue, TValue value)

Initializes a new instance of the ConditionalValue class with the given value.

Parameters:

hasValue - Indicates whether the value is valid.
value - The value.

Method Details

getValue

public TValue getValue()

Gets the value.

Returns:

The value.

hasValue

public boolean hasValue()

Gets a value indicating whether the value is valid.

Returns:

Whether the value is valid.

Applies to