public class

IntWrapper

extends Object
java.lang.Object
   ↳ com.microstrategy.webapi.IntWrapper

Class Overview

A mutable wrapper for the int primitive. Used when multiple return values are required from a function, and some are ints.

Summary

Public Constructors
IntWrapper()
Default constructor.
IntWrapper(int startval)
This constructor sets the internal value to the passed value.
IntWrapper(String data)
Constructor that sets the wrapped integer to the int value of the string variable passed in.
Public Methods
int getInt()
getter method for the wrapped integer
String getString()
Returns the wrapped integer as a String variable.
void setInt(int newval)
setter method for the wrapped integer
void setString(String val)
Sets the wrapped integer to the integer representation of the string that is passed in.
String toString()
Overrides toString on java.lang.Object.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public IntWrapper ()

Default constructor. Sets the wrapped integer to 0.

public IntWrapper (int startval)

This constructor sets the internal value to the passed value.

Parameters
startval The initial value of the wrapped int.

public IntWrapper (String data)

Constructor that sets the wrapped integer to the int value of the string variable passed in.

Parameters
data This argument will be converted to an integer and the wrapped int will be set to it. The wrapped int will be set to 0 instead if it cannot be converted into an integer.

Public Methods

public int getInt ()

getter method for the wrapped integer

Returns
  • Value of wrapped integer.

public String getString ()

Returns the wrapped integer as a String variable.

Returns
  • Value of the wrapped integer in String form.

public void setInt (int newval)

setter method for the wrapped integer

Parameters
newval The value that the wrapped integer will be set to.

public void setString (String val)

Sets the wrapped integer to the integer representation of the string that is passed in.

Parameters
val The value that the wrapped integer will be set to. If this argument cannot be successfully be changed to an int, the wrapped integer will be set to 0.

public String toString ()

Overrides toString on java.lang.Object.

Returns
  • The internal integer in string format.