I have a class with some variables like so
class Foo {
// Instance Variables
String myString;
int myNums1;
int myNums2;
// Constructor Declaration of Class
Flow(String myString, int myNums){
this.myString = myString;
this.myNums1 = myNums1;
this.myNums2 = myNums2;
}
}
In my draw function, I would like to access the myNums variable.
// create Foo instance foo
for (int i=0; i<myTable.getRowCount(); i++) {
String myString = myTable.getString(i, 0); //myTable is defined elsewhere and works just fine
int myNums = myTable.getInt(i,1);
}
draw(){
numFlag = 1;
for (int i=0; i < foo.size(); i++){
float myWeight = map(foo.get(numFlag).get(i), 0, 10000, 0, 50);
strokeWeight(myWeight);
// draw something here...
}
How can I get the ith value of the numFlagth variable?