Table of Contents

Class EzrInteger

Namespace
EzrSquared.Runtime.Types.Core.Numerics
Assembly
ezrSquared-lib.dll

The integer type object.

public class EzrInteger : EzrObject, IEzrObject
Inheritance
object
EzrInteger
Implements
Inherited Members

Constructors

EzrInteger(BigInteger, Context, Position, Position)

The integer type object.

public EzrInteger(BigInteger value, Context parentContext, Position startPosition, Position endPosition)

Parameters

value BigInteger

The value.

parentContext Context

The parent context.

startPosition Position

The starting position of the object.

endPosition Position

The ending position of the object.

Fields

Value

The integer value.

public readonly BigInteger Value

Field Value

BigInteger

ValueSize

The size of the Value.

public readonly EzrInteger.Size ValueSize

Field Value

EzrInteger.Size

_doubleRepresentation

The double representation of Value. May be null.

private double? _doubleRepresentation

Field Value

double?

_intRepresentation

The int representation of Value. May be null.

private int? _intRepresentation

Field Value

int?

_longRepresentation

The long representation of Value. May be null.

private long? _longRepresentation

Field Value

long?

Properties

Tag

The tag of the type of this object, similar to C# namespace naming conventions.

public override string Tag { get; protected internal set; }

Property Value

string

TypeName

The name of the type of this object, in plain text, all lowercase. Spaces are allowed.

public override string TypeName { get; protected internal set; }

Property Value

string

Methods

Addition(IEzrObject, RuntimeResult)

Performs the addition operation between the current object and another.

public override void Addition(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

Affirmation(RuntimeResult)

Affirms the current object.

public override void Affirmation(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying the result and any errors.

BitwiseAnd(IEzrObject, RuntimeResult)

Performs the bit-wise AND operation between the current object and another.

public override void BitwiseAnd(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

BitwiseLeftShift(IEzrObject, RuntimeResult)

Performs the bit-wise left-shift operation between the current object and another.

public override void BitwiseLeftShift(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

BitwiseNegation(RuntimeResult)

Bit-wise negates the current object.

public override void BitwiseNegation(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying the result and any errors.

BitwiseOr(IEzrObject, RuntimeResult)

Performs the bit-wise OR operation between the current object and another.

public override void BitwiseOr(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

BitwiseRightShift(IEzrObject, RuntimeResult)

Performs the bit-wise right-shift operation between the current object and another.

public override void BitwiseRightShift(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

BitwiseXOr(IEzrObject, RuntimeResult)

Performs the bit-wise X-OR operation between the current object and another.

public override void BitwiseXOr(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ComparisonEqual(IEzrObject, RuntimeResult)

Compares the object to another, checks equality.

public override void ComparisonEqual(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ComparisonGreaterThan(IEzrObject, RuntimeResult)

Compares the object to another, checks if the current object is greater than the other.

public override void ComparisonGreaterThan(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ComparisonGreaterThanOrEqual(IEzrObject, RuntimeResult)

Compares the object to another, checks if the current object is greater than or equal to the other.

public override void ComparisonGreaterThanOrEqual(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ComparisonLessThan(IEzrObject, RuntimeResult)

Compares the object to another, checks if the current object is less than the other.

public override void ComparisonLessThan(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ComparisonLessThanOrEqual(IEzrObject, RuntimeResult)

Compares the object to another, checks if the current object is less than or equal to the other.

public override void ComparisonLessThanOrEqual(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ComparisonNotEqual(IEzrObject, RuntimeResult)

Compares the object to another, checks unequality.

public override void ComparisonNotEqual(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ComputeHashCode(RuntimeResult)

Evaluates the current object as its hash.

public override int ComputeHashCode(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying any errors.

Returns

int

The evaluated value.

Division(IEzrObject, RuntimeResult)

Performs the division operation between the current object and another.

public override void Division(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

EvaluateBoolean(RuntimeResult)

Evaluates the current object as a boolean value.

public override bool EvaluateBoolean(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying any errors.

Returns

bool

The evaluated value.

GetDoubleRepresentation()

Gets a double representation of the current object.

public double GetDoubleRepresentation()

Returns

double

The double representation.

GetIntRepresentation()

Gets an int representation of the current object. Use only if you know the value of the current object will fit in an int value.

public int GetIntRepresentation()

Returns

int

The int representation.

Inversion(RuntimeResult)

Inverts the current object, like, for example, true to false.

public override void Inversion(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying the result and any errors.

Modulo(IEzrObject, RuntimeResult)

Performs the modulo operation between the current object and another.

public override void Modulo(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

Multiplication(IEzrObject, RuntimeResult)

Performs the multiplication operation between the current object and another.

public override void Multiplication(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

Negation(RuntimeResult)

Negates the current object.

public override void Negation(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying the result and any errors.

Power(IEzrObject, RuntimeResult)

Performs the power or exponent operation between the current object and another.

public override void Power(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

StrictEquals(IEzrObject, RuntimeResult)

Strictly compares the current object to another, taking into account inheritance.

public override bool StrictEquals(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying any errors.

Returns

bool

Subtraction(IEzrObject, RuntimeResult)

Performs the subtraction operation between the current object and another.

public override void Subtraction(IEzrObject other, RuntimeResult result)

Parameters

other IEzrObject

The other object in the operation.

result RuntimeResult

Runtime result for carrying the result and any errors.

ToString(RuntimeResult)

Evaluates the current object as a string value.

public override string ToString(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying any errors.

Returns

string

The evaluated value.

TryGetIntRepresentation(out int)

Tries to get an int representation of the current object.

public bool TryGetIntRepresentation(out int value)

Parameters

value int

The int representation.

Returns

bool

true if successful, false otherwise.

TryGetLongRepresentation(out long)

Tries to get a long representation of the current object.

public bool TryGetLongRepresentation(out long value)

Parameters

value long

The long representation.

Returns

bool

true if successful, false otherwise.