![]() | Force-FrameworkMark Brennand |
| Description | Class providing an implementation of Optional which should be used in preference to using null to indicate a value is un-assigned. See README for full details of Optional. Copyright (c) 2025 Mark Brennand, released under MIT License. |
|---|---|
| Author | Mark Brennand |
| Description | Returns the value assigned to the Optional as a Collection allowing the functionality of ArrayV1 to be used. If the Optional is un-assigned, a NoSuchElementException is thrown. |
|---|---|
| Returns | A Collection representing the value. |
| Description | Returns the value assigned to the Optional as a Collection allowing the functionality of ArrayV1 to be used. If the Optional is un-assigned, the collection represented by the argument is used. |
|---|---|
| Parameter | other: Fallback collection to use if Optional has no value. |
| Returns | A Collection representing the value. |
| Description | Returns an un-assigned Optional. |
|---|---|
| Returns | An un-assigned Optional. |
| Description | Returns the value assigned to the Optional. If the Optional is un-assigned, a NoSuchElementException is thrown. |
|---|---|
| Returns | The value assigned to the Optional. |
| Description | Returns true if the Optional has a value, false if not. |
|---|---|
| Returns | True if the Optional has a value. |
| Description | Returns an Optional assigned to a value. |
|---|---|
| Parameter | value: The value to assign the the Optional. |
| Returns | The assigned Optional. |
| Description | Returns an Optional assigned to a value or an unassigned Optional if the argument is null. |
|---|---|
| Parameter | value: The value to assign the the Optional. |
| Returns | The assigned Optional. |
| Description | Returns the Optional value if assigned, the value of the other argument if not. |
|---|---|
| Parameter | other: The value to return if the Optional is un-assigned. |
| Returns | The Optional value, or the other value. |
| Description | Uses the given Function to process an Optional. The method may be used to build a chain of functions to process an Optional. |
|---|---|
| Parameter | function: The transformer to create the value. |
| Returns | The value returned by the transformer. |
| Description | Interface to allow Optional value to be processed. |
|---|
| Description | Method called to process the value of an Optional. The implementor must return an Optional representing the result of the processing. |
|---|---|
| Parameter | value: The Optional to be processed. |
| Returns | The result of the processing. |