@Override public Boolean nextBoolean() throws ParameterException { try { return next().equalsIgnoreCase("true"); } catch (IndexOutOfBoundsException e) { throw new MissingParameterException(); } }
@Override public Integer nextInt() throws ParameterException { try { return Integer.parseInt(next()); } catch (NumberFormatException e) { throw new ParameterException( "Expected a number, got '" + context.getString(index - 1) + "'"); } }
@Override public Double nextDouble() throws ParameterException { try { return Double.parseDouble(next()); } catch (NumberFormatException e) { throw new ParameterException( "Expected a number, got '" + context.getString(index - 1) + "'"); } }