private int currencyIndex;
private static int currencyIndex(String currency) {
if (! processedCurrency(currency)) {
throw new
Error("Currency " + currency + " unknown");
}
return currencyIndex;
}
public static boolean processedCurrency(String
currency) {
for (currencyIndex = 0; currencyIndex
< currencies.length; currencyIndex++)
{
if (currencies[currencyIndex].equals(currency))
{
break;
}
}
return currencyIndex
< currencies.length;
}
equals(Object)
, toString()
and hashCode(),
inherited from java.lang.Object
.