Documentation
¶
Index ¶
- type Optional
- func (o Optional[T]) Filter(f func(T) bool) Optional[T]
- func (o Optional[T]) Get() (T, bool)
- func (o Optional[T]) HasValue() bool
- func (o Optional[T]) IfAbsent(consumer func())
- func (o Optional[T]) IfPresent(consumer func(T))
- func (o Optional[T]) IsEmpty() bool
- func (o Optional[T]) Map[U any](mapper func(v T) (U, bool)) Optional[U]
- func (o Optional[T]) Must() T
- func (o Optional[T]) OrElse(defaultValue T) T
- func (o Optional[T]) OrElseGet(getter func() T) T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.