MapOfOptions<K, V extends Object> extension

on

Properties

someValues Map<K, V>

Available on Map<K, Option<V>>, provided by the MapOfOptions extension

Returns a new map containing only the unwrapped values from Some entries.
no setter

Methods

partition() MapOptionPartition<K, V>

Available on Map<K, Option<V>>, provided by the MapOfOptions extension

Partitions the map into a record containing two maps: one for Some values and one for None values.
sequence() Option<Map<K, V>>

Available on Map<K, Option<V>>, provided by the MapOfOptions extension

Turns a Map<K, Option<V>> into an Option<Map<K, V>>. If all values are Some, it returns a Some<Map<K, V>>. If any value is a None, it returns None.
whereNone() Map<K, None<V>>

Available on Map<K, Option<V>>, provided by the MapOfOptions extension

Creates a new map containing only the entries where the value is a None.
whereSome() Map<K, Some<V>>

Available on Map<K, Option<V>>, provided by the MapOfOptions extension

Creates a new map containing only the entries where the value is a Some. The values in the new map are instances of Some<V>.