public void addSetAmmoTo(String s){
  int ewSpot=s.indexOf(':');
  int amSpot=s.indexOf('-');
  if (s.isEmpty() || (ewSpot < 1) || (amSpot < ewSpot)) {
    return;
  }
  int loc=Integer.parseInt(s.substring(0,ewSpot));
  int slot=Integer.parseInt(s.substring(ewSpot + 1,amSpot));
  int setTo=Integer.parseInt(s.substring(amSpot + 1));
  ammoSetTo.add(new SetAmmoTo(loc,slot - 1,setTo));
}

public void addSetAmmoTo ( String s ) { int ewSpot = s . indexOf ( ':' ) ; int amSpot = s . indexOf ( '-' ) ; if ( s . isEmpty ( ) || ( ewSpot < 1 ) || ( amSpot < ewSpot ) ) { return ; } int loc = Integer . parseInt ( s . substring ( 0 , ewSpot ) ) ; int slot = Integer . parseInt ( s . substring ( ewSpot + 1 , amSpot ) ) ; int setTo = Integer . parseInt ( s . substring ( amSpot + 1 ) ) ; ammoSetTo . add ( new SetAmmoTo ( loc , slot - 1 , setTo ) ) ; }
converts 2 : 1 - 34 to location 2 slot 1 set ammo to 34
