-
Notifications
You must be signed in to change notification settings - Fork 36
T_CodeJam_Option
andrewvk edited this page Apr 20, 2016
·
6 revisions
[This is preliminary documentation and is subject to change.]
Methods to work with Option(T)
System.Object
CodeJam.Option
Namespace: CodeJam
Assembly: CodeJam (in CodeJam.dll) Version: 1.0.0.0 (1.0.0.0)
C#
public static class Option
VB
<ExtensionAttribute>
Public NotInheritable Class Option
F#
[<AbstractClassAttribute>]
[<SealedAttribute>]
[<ExtensionAttribute>]
type Option = class end
The Option type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() |
Create(T) | Create instance of Option(T) |
![]() ![]() |
GetValueOrDefault(T) | Returns value of option, or defaultValue if option hasn't it. |
![]() ![]() |
Map(T, TResult) | Converts option value to another option with selectFunc. |
![]() ![]() |
Match(T)(Option(T), Action(Option(T)), Action) | Calls someAction if option has value, and noneAction otherwise. |
![]() ![]() |
Match(T, TResult)(Option(T), Func(Option(T), TResult), Func(TResult)) | Calls someFunc if option has value, and noneFunc otherwise. |