Skip to content

Methods_T_CodeJam_Option

andrewvk edited this page Apr 20, 2016 · 4 revisions

Option Methods

[This is preliminary documentation and is subject to change.]

The Option type exposes the following members.

Methods

 

Name Description
Public methodStatic member Create(T) Create instance of Option(T)
Public methodStatic member GetValueOrDefault(T) Returns value of option, or defaultValue if option hasn't it.
Public methodStatic member Map(T, TResult) Converts option value to another option with selectFunc.
Public methodStatic member Match(T)(Option(T), Action(Option(T)), Action) Calls someAction if option has value, and noneAction otherwise.
Public methodStatic member Match(T, TResult)(Option(T), Func(Option(T), TResult), Func(TResult)) Calls someFunc if option has value, and noneFunc otherwise.
  Back to Top

See Also

Reference

Option Class
CodeJam Namespace

Clone this wiki locally