@Test(expected = IndexOutOfBoundsException.class) public void whenNegativeIndex() { validatingArguments.get(-1); }
@Override public String get(int index) { if (index < 0 || index >= length()) { throw new IndexOutOfBoundsException("Out of bounds: " + index); } return argumentSet.get(index); }
ValidatingArgumentSet implements ArgumentSet { @Override public String get(int index) { if (index < 0 || index >= length()) { throw new IndexOutOfBoundsException("Out of bounds: " + index); } return argumentSet.get(index); } }
ValidatingArgumentSet implements ArgumentSet { @Override public String get(int index) { if (index < 0 || index >= length()) { throw new IndexOutOfBoundsException("Out of bounds: " + index); } return argumentSet.get(index); } ValidatingArgumentSet(ArgumentSet argumentSet); }
ValidatingArgumentSet implements ArgumentSet { @Override public String get(int index) { if (index < 0 || index >= length()) { throw new IndexOutOfBoundsException("Out of bounds: " + index); } return argumentSet.get(index); } ValidatingArgumentSet(ArgumentSet argumentSet); @Override String get(int index); @Override int length(); @Override List<String> getAll(); @Override boolean isEmpty(); @Override boolean has(String argument); @Override String join(); @Override String[] toArray(); }
ValidatingArgumentSet implements ArgumentSet { @Override public String get(int index) { if (index < 0 || index >= length()) { throw new IndexOutOfBoundsException("Out of bounds: " + index); } return argumentSet.get(index); } ValidatingArgumentSet(ArgumentSet argumentSet); @Override String get(int index); @Override int length(); @Override List<String> getAll(); @Override boolean isEmpty(); @Override boolean has(String argument); @Override String join(); @Override String[] toArray();  }