Class monkey.boxes.IntObject - leonard-thieu/monkey GitHub Wiki

The IntObject box class can be used to encapsulate an int value inside an object.

Constructors

Methods

Detailed Discussion

The IntObject box class can be used to encapsulate an int value inside an object.

Constructor Documentation

Method New ()

Creates a new IntObject with the value 0.

Method New ( value:Int )

Creates a new IntObject with the given value.

Method New ( value:Float )

Creates a new IntObject with the given float value converted to an int.

Method Documentation

Method Compare : Int ( box:IntObject )

Compares IntObjects. Returns a value <0 if this int value is less than box, a value >0 if this int value is greater than box, or 0 if both int values are equal.

Method Equals : Bool ( box:IntObject )

Tests IntObjects for equality. Returns true if the values are equal, else false.

Method ToFloat : Float ()

Returns the int value contained in the IntObject converted to a float.

Method ToInt : Int ()

Returns the int value contained in the IntObject.

Method ToString : String ()

Returns the int value contained in the IntObject converted to a string.

⚠️ **GitHub.com Fallback** ⚠️