int i = -1;
int match = Integer.parseInt(arg);
boolean hasMatch = false;
while(iter.hasNext()){
i++;
IServer server = (IServer) iter.next();
// the whole construct looks strange, but with blueprint this seems necessary
if(i == match) {
hasMatch = true;
System.out.println("Server : ["+i+"] "
+ server.getBuildServerAlias()
+ "=" + server.getBuildServerURI()
+ " [config source: "+ server.getBuildServerSource()
+ " | server type: " + server.getBuildServerType()
+ " | version: " + server.getBuildServerVersion()
+ "]");
}
}
if(!hasMatch){
System.out.println("No matching server found." );