GLG Toolkit, Java Class Library  Version 4.5

Mutable integer object. More...

Detailed Description

Mutable integer object.

This object contains an integer value and is used to pass integer values as objects to and from the SendMessage method.

Public Member Functions

 GlgInteger ()
 Default contsructor. More...
 
 GlgInteger (GlgInteger integer_obj)
 Copy constructor. More...
 
 GlgInteger (int value)
 Constructs a new GlgInteger with a specified value. More...
 
 GlgInteger (Integer integer_obj)
 Constructs a new GlgInteger with a specified value. More...
 
void CopyFrom (GlgInteger integer_obj)
 Copies a value from another GlgInteger. More...
 
int intValue ()
 Returns this object's value. More...
 
int IntValue ()
 Returns this object's value. More...
 

Static Public Member Functions

static GlgInteger GetFromCache (int value)
 Gets a GlgInteger object from a cache. More...
 
static void ReleaseToCache (GlgInteger integer_obj)
 Returns the object to the internal cache for reuse. More...
 

Public Attributes

int ivalue
 The object's value. More...
 

Member Data Documentation

◆ ivalue

int ivalue

The object's value.

Constructor & Destructor Documentation

◆ GlgInteger() [1/4]

Default contsructor.

◆ GlgInteger() [2/4]

GlgInteger ( int  value)

Constructs a new GlgInteger with a specified value.

Parameters
valueThe new value.

◆ GlgInteger() [3/4]

GlgInteger ( GlgInteger  integer_obj)

Copy constructor.

Parameters
integer_objAn object to copy.

◆ GlgInteger() [4/4]

GlgInteger ( Integer  integer_obj)

Constructs a new GlgInteger with a specified value.

Parameters
integer_objThe object containing a new value.

Member Function Documentation

◆ CopyFrom()

void CopyFrom ( GlgInteger  integer_obj)

Copies a value from another GlgInteger.

Parameters
integer_objThe object to copy the value from.

◆ GetFromCache()

static GlgInteger GetFromCache ( int  value)
static

Gets a GlgInteger object from a cache.

The method returns an object from an internal cache, or a newly created object if the cache is empty. The returned object is initialized to the specified value.

Parameters
valueThe new value.
Returns
An object from an internal cache.

◆ intValue()

int intValue ( )

Returns this object's value.

Returns
The object's value.

◆ IntValue()

int IntValue ( )

Returns this object's value.

Returns
The object's value.

◆ ReleaseToCache()

static void ReleaseToCache ( GlgInteger  integer_obj)
static

Returns the object to the internal cache for reuse.

The object should not be accessed after it is released to the cache.

Only objects obtained with a call to GLG API method should be released to the cache. Releasing to the cache objects created with new would result in consuming resources due to the growth of the cache size.

Parameters
integer_objThe object to release.