private int getTableIndex ( String tableName ) { int index ; // System.out.println("begin searching for "+tableName); for ( index = 0 ; index < vHoldTableNames . size ( ) ; index ++ ) { // System.out.println("in getTableIndex searching for "+tableName+", index: "+index); if ( tableName . equals ( ( String ) vHoldTableNames . elementAt ( index ) ) ) { return index ; } // end of if (tableName.equals(vHoldTableNames.elementAt(index))) } // end of for (index = 0; index < vHoldTableNames.size(); index ++) return - 1 ; }
if the name is not in vHoldTableNames answer - 1