Class: Optional<T>
A type that represents an optional value.
Type Parameters
| Type Parameter | Description | 
|---|---|
| 
 | The type of the value that can be optional. | 
Implements
- Schema<- T|- null>
Constructors
new Optional()
Creates a new Optional type.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| 
 | 
 | The schema that describes the type of the value that can be optional. | 
Returns
Optional<T>
Defined in
Methods
write()
write(
writer:ByteStreamWriter,value:null|T):void
Writes the Schema to the buffer.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| 
 | The buffer writer. | |
| 
 | 
 | The Schema value to write, or null. | 
Returns
void
Implementation of
Schema.write
Defined in
read()
read(
reader:ByteStreamReader):null|T
Reads the Schema from the buffer.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| 
 | The buffer reader. | 
Returns
null | T
The Schema read from the buffer or null.
Implementation of
Schema.read