Skip to content

T_CSharpx_Just_1

Moh.Hassan edited this page Oct 10, 2019 · 1 revision

Just(T) Class

Models a Maybe when contains a value.

Inheritance Hierarchy

System.Object
  CSharpx.Maybe(T)
    CSharpx.Just(T)
Namespace: CSharpx
Assembly: CommandLine (in CommandLine.dll) Version: 0.0.0

Syntax

C#

internal sealed class Just<T> : Maybe<T>

VB

Friend NotInheritable Class Just(Of T)
	Inherits Maybe(Of T)

C++

generic<typename T>
internal ref class Just sealed : public Maybe<T>

F#

[<SealedAttribute>]
type Just<'T> =  
    class
        inherit Maybe<'T>
    end

Type Parameters

 

T
  The Just(T) type exposes the following members.

Constructors

 

Name Description
Protected method Just(T) Initializes a new instance of the Just(T) class
  Back to Top

Properties

 

Name Description
Public property Tag Type discriminator. (Inherited from Maybe(T).)
Public property Value The wrapped value.
  Back to Top

Methods

 

Name Description
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method MatchJust Matches a value returning true and value itself via output parameter. (Inherited from Maybe(T).)
Public method MatchNothing Matches an empty value returning true. (Inherited from Maybe(T).)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
  Back to Top

Extension Methods

 

Name Description
Public Extension Method Bind(T, T2) Invokes a function on this maybe value that itself yields a maybe. (Defined by MaybeExtensions.)
Public Extension Method Do(T) If contans a value executes an Action(T) delegate over it. (Defined by MaybeExtensions.)
Public Extension Method FromJust(T) Extracts the element out of a Just(T) and returns a default value if its argument is Nothing(T). (Defined by MaybeExtensions.)
Public Extension Method FromJustOrFail(T) Extracts the element out of a Just(T) and throws an error if its argument is Nothing(T). (Defined by MaybeExtensions.)
Public Extension Method GetValueOrDefault(T) If contains a values returns it, otherwise returns noneValue. (Defined by MaybeExtensions.)
Private Extension Method IsEmpty (Defined by UnParserExtensions.)
Public Extension Method IsJust(T) Returns true iffits argument is of the form Just(T). (Defined by MaybeExtensions.)
Public Extension Method IsNothing(T) Returns true iffits argument is of the form Nothing(T). (Defined by MaybeExtensions.)
Public Extension Method Map(T, T2) Transforms this maybe value by using a specified mapping function. (Defined by MaybeExtensions.)
Public Extension Method MapValueOrDefault(T, T2) If contains a values executes a mapping function over it, otherwise returns noneValue. (Defined by MaybeExtensions.)
Public Extension Method Match(T) Provides pattern matching using Action delegates. (Defined by MaybeExtensions.)
Private Extension Method NormalizeValue (Defined by UnParserExtensions.)
Public Extension Method Select(T, TResult) Map operation compatible with Linq. (Defined by MaybeExtensions.)
Public Extension Method SelectMany(T, TValue, TResult) Bind operation compatible with Linq. (Defined by MaybeExtensions.)
Public Extension Method ToEnumerable(T) Returns an empty list when given Nothing(T) or a singleton list when given a Just(T). (Defined by MaybeExtensions.)
  Back to Top

See Also

Reference

CSharpx Namespace

Clone this wiki locally