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, setValue
public 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()
Variable
Variable
object.public int getLength()
public int getValue(int index) throws JMException
index
- Index of value to be returnedJMException
public void setValue(int index, int value) throws JMException
index
- Index of value to be returnedvalue
- The value to be set in position indexJMException
public double getLowerBound(int index) throws JMException
index
- The index of the valueJMException
public double getUpperBound(int index) throws JMException
index
- The index of the valueJMException
public java.lang.String toString()
toString
in class java.lang.Object