public class ArrayInt extends Variable
| Modifier and Type | Field and Description |
|---|---|
int[] |
array_
Stores an array of integer values
|
int |
size_
Stores the length of the array
|
| Constructor and Description |
|---|
ArrayInt()
Constructor
|
ArrayInt(ArrayInt arrayInt)
Copy Constructor
|
ArrayInt(int size)
Constructor
|
ArrayInt(int size,
double[] lowerBounds,
double[] upperBounds) |
| Modifier and Type | Method and Description |
|---|---|
Variable |
deepCopy()
Creates an exact copy of a
Variable object. |
int |
getLength()
Returns the length of the arrayInt.
|
double |
getLowerBound(int index)
Get the lower bound of a value
|
double |
getUpperBound(int index)
Get the upper bound of a value
|
int |
getValue(int index)
getValue
|
void |
setValue(int index,
int value)
setValue
|
java.lang.String |
toString()
Returns a string representing the object
|
getLowerBound, getUpperBound, getValue, getVariableType, setLowerBound, setUpperBound, setValuepublic int[] array_
public int size_
public ArrayInt()
public ArrayInt(int size)
size - Size of the arraypublic ArrayInt(int size,
double[] lowerBounds,
double[] upperBounds)
public ArrayInt(ArrayInt arrayInt)
arrayInt - The arrayInt to copypublic Variable deepCopy()
VariableVariable object.public int getLength()
public int getValue(int index)
throws JMException
index - Index of value to be returnedJMExceptionpublic void setValue(int index,
int value)
throws JMException
index - Index of value to be returnedvalue - The value to be set in position indexJMExceptionpublic double getLowerBound(int index)
throws JMException
index - The index of the valueJMExceptionpublic double getUpperBound(int index)
throws JMException
index - The index of the valueJMExceptionpublic java.lang.String toString()
toString in class java.lang.Object