GenericNullable<T>
Overview
Wrapper class for nullable types that can be both value and class types.
Location
- Reference: Island.fx
- Namespace: RemObjects.Elements.System
- Ancestry: ValueType | GenericNullable<T>
constructor protected (declared in ValueType)
constructor
GenericNullable<T>()
init()
GenericNullable<T>()
Sub New()
constructor (T)
constructor(aValue: T)
GenericNullable<T>(T aValue)
init(_ aValue: T)
GenericNullable<T>(T aValue)
Sub New(aValue As T)
Parameters:
- aValue:
Equals virtual (declared in Object)
Default constructor.
Parameters:
- aOther: the reference to compare this with.
Finalize protected virtual (declared in Object)
method Finalize
void Finalize()
func Finalize()
void Finalize()
Sub Finalize()
GetHashCode virtual (declared in Object)
Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.
method GetHashCode: Int32
Int32 GetHashCode()
func GetHashCode() -> Int32
Int32 GetHashCode()
Function GetHashCode() As Int32
GetType (declared in Object)
Returns the actual type of this class
method GetType: Type
Type GetType()
func GetType() -> Type
Type GetType()
Function GetType() As Type
GetValueOrDefault
Returns the value or default(T) if it's not set.
method GetValueOrDefault: T
T GetValueOrDefault()
func GetValueOrDefault() -> T
T GetValueOrDefault()
Function GetValueOrDefault() As T
GetValueOrDefault (T): T
Returns the value or a default if it's not set.
method GetValueOrDefault(aDefault: T): T
T GetValueOrDefault(T aDefault)
func GetValueOrDefault(_ aDefault: T) -> T
T GetValueOrDefault(T aDefault)
Function GetValueOrDefault(aDefault As T) As T
Parameters:
- aDefault:
HasValue
returns true if this nullable is set.
property HasValue: Boolean read;
Boolean HasValue { get; }
var HasValue: Boolean { get{} }
Boolean HasValue { __get; }
ReadOnly Property HasValue() As Boolean
ReferenceEquals (declared in Object)
Compares two references for equivalence (even if they have an equals operator)
Parameters:
- a: left value
- b: right value
ToString virtual (declared in Object)
Gets the string representation of this method.
method ToString: String
String ToString()
func ToString() -> String
String ToString()
Function ToString() As String
Value
Implicitly convert a nullable to T. Throws if it's nil.
property Value: T read;
T Value { get; }
var Value: T { get{} }
T Value { __get; }
ReadOnly Property Value() As T
HasValue
returns true if this nullable is set.
property HasValue: Boolean read;
Boolean HasValue { get; }
var HasValue: Boolean { get{} }
Boolean HasValue { __get; }
ReadOnly Property HasValue() As Boolean
Value
Implicitly convert a nullable to T. Throws if it's nil.
property Value: T read;
T Value { get; }
var Value: T { get{} }
T Value { __get; }
ReadOnly Property Value() As T
ReferenceEquals (declared in Object)
Compares two references for equivalence (even if they have an equals operator)
Parameters:
- a: left value
- b: right value
constructor protected (declared in ValueType)
constructor
GenericNullable<T>()
init()
GenericNullable<T>()
Sub New()
constructor (T)
constructor(aValue: T)
GenericNullable<T>(T aValue)
init(_ aValue: T)
GenericNullable<T>(T aValue)
Sub New(aValue As T)
Parameters:
- aValue:
Equals virtual (declared in Object)
Default constructor.
Parameters:
- aOther: the reference to compare this with.
Finalize protected virtual (declared in Object)
method Finalize
void Finalize()
func Finalize()
void Finalize()
Sub Finalize()
GetHashCode virtual (declared in Object)
Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.
method GetHashCode: Int32
Int32 GetHashCode()
func GetHashCode() -> Int32
Int32 GetHashCode()
Function GetHashCode() As Int32
GetType (declared in Object)
Returns the actual type of this class
method GetType: Type
Type GetType()
func GetType() -> Type
Type GetType()
Function GetType() As Type
GetValueOrDefault
Returns the value or default(T) if it's not set.
method GetValueOrDefault: T
T GetValueOrDefault()
func GetValueOrDefault() -> T
T GetValueOrDefault()
Function GetValueOrDefault() As T
GetValueOrDefault (T): T
Returns the value or a default if it's not set.
method GetValueOrDefault(aDefault: T): T
T GetValueOrDefault(T aDefault)
func GetValueOrDefault(_ aDefault: T) -> T
T GetValueOrDefault(T aDefault)
Function GetValueOrDefault(aDefault As T) As T
Parameters:
- aDefault:
ToString virtual (declared in Object)
Gets the string representation of this method.