throw new Exception(name + " is invalid ");
if (squareBracketStart > -1 && squareBracketEnd < 0)
throw new Exception(name + " is invalid ");
if (squareBracketStart < 0 && squareBracketEnd < 0)
{
return new Index(Name.valueOf(name.toUpperCase()), 0);
}
String sIDX = name.substring(squareBracketStart + 1, squareBracketEnd).trim();
name = name.substring(0, squareBracketStart);
idx = Integer.parseInt(sIDX);
if (idx < 0)
throw new IndexOutOfBoundsException();
return new Index(Name.valueOf(name.toUpperCase()), idx);
}