frost.core

Class Bit

    └ Value
         └ Immutable
             └ Object

Implemented Interfaces:
Source Code:
View Source

Initializer Summary

init(value:builtin_bit):Bit
Inherited Fields:

Instance Method Summary

-- equals operator --
=(other:Bit):Bit
Returns true if these objects are equal.
-- not equal operator --
!=(other:Bit):Bit
Returns true if these objects are not equal.
-- not operator --
!():Bit
Returns the logical inverse of this Bit, so !true is false and !false is true.
-- logical or operator --
|(other:Bit):Bit
Returns the logical OR of two Bits.
-- logical and operator --
&(other:Bit):Bit
Returns the logical AND of two Bits.
-- logical exclusive or operator --
~(other:Bit):Bit
Returns the logical XOR of two Bits.
choose<T>(ifTrue:T, ifFalse:T):T
Returns ifTrue or ifFalse based on the value of this Bit.
format(fmt:String):String
Chooses one of two strings based on the value of this Bit.

Initializers

init (value:builtin_bit
):Bit
Parameters:
value - value of type builtin_bit

Instance Methods

-- equals operator --
@override
function = (other:Bit
):Bit

Returns true if these objects are equal.

Parameters:
other - value of type Bit
Overrides:
frost.core.Equatable.=
-- not equal operator --
@override
function != (other:Bit
):Bit

Returns true if these objects are not equal.

Parameters:
other - value of type Bit
Overrides:
frost.core.Equatable.!=
-- not operator --
function ! ():Bit

Returns the logical inverse of this Bit, so !true is false and !false is true.

-- logical or operator --
function | (other:Bit
):Bit

Returns the logical OR of two Bits.

Parameters:
other - value of type Bit
-- logical and operator --
function & (other:Bit
):Bit

Returns the logical AND of two Bits.

Parameters:
other - value of type Bit
-- logical exclusive or operator --
function ~ (other:Bit
):Bit

Returns the logical XOR of two Bits.

Parameters:
other - value of type Bit
function choose<T> (ifTrue:T,
 ifFalse:T
):T

Returns ifTrue or ifFalse based on the value of this Bit.

Parameters:
ifTrue - value of type T
ifFalse - value of type T
@override
function format (fmt:String
):String

Chooses one of two strings based on the value of this Bit. The format string must be of the form trueString|falseString, and the result will be trueString if this Bit is true, otherwise falseString. If multiple '|' characters occur in the format string, only the first one is significant and the others are part of the false string.

Parameters:
fmt - value of type String
Overrides:
frost.core.Formattable.format