ConditionalValue<TValue> Class
- java.
lang. Object - microsoft.
servicefabric. data. ConditionalValue<TValue>
- microsoft.
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:
Method Details
getValue
public TValue getValue()
Gets the value.
Returns:
hasValue
public boolean hasValue()
Gets a value indicating whether the value is valid.
Returns:
Applies to
Azure SDK for Java