Optional Class |
Namespace: Tangosol.Util
public class Optional : IPortableObject
The Optional type exposes the following members.
| Name | Description | |
|---|---|---|
| IsPresent |
Whether there is a value present.
| |
| Value |
The value of the Optional object; can be null.
|
| Name | Description | |
|---|---|---|
| Empty |
Returns a Optional instance with null object value.
| |
| Equals |
Compares this object with another object for equality.
(Overrides ObjectEquals(Object).) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
| GetHashCode |
Returns a hash code value for this object.
(Overrides ObjectGetHashCode.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| Of |
Returns an Optional instance with the given object value.
| |
| OfNullable |
Returns an Optional describing the specified value, if non-null,
otherwise returns an empty Optional.
| |
| OrElse |
Returns value if present, otherwise, return the given object.
| |
| ReadExternal |
Restore the contents of a user type instance by reading its state
using the specified IPofReader object.
| |
| ToString |
Returns a non-empty string representation of this Optional suitable
for debugging. The exact presentation format is unspecified and may
vary between implementations and versions.
(Overrides ObjectToString.) | |
| WriteExternal |
Save the contents of a POF user type instance by writing its
state using the specified IPofWriter object.
|