Add missing '@Override' annotations

Add missing '@Override' annotations to implementations of interface methods

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1635504 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2014-10-30 14:04:49 +00:00
parent a7c3ae2cfd
commit a2b9dfbd4e
3 changed files with 10 additions and 0 deletions

View File

@ -302,6 +302,7 @@ public final class CSVParser implements Iterable<CSVRecord>, Closeable {
* @throws IOException
* If an I/O error occurs
*/
@Override
public void close() throws IOException {
if (this.lexer != null) {
this.lexer.close();
@ -424,6 +425,7 @@ public final class CSVParser implements Iterable<CSVRecord>, Closeable {
* If the parser is closed a call to {@code next()} will throw a
* NoSuchElementException.</p>
*/
@Override
public Iterator<CSVRecord> iterator() {
return new Iterator<CSVRecord>() {
private CSVRecord current;
@ -437,6 +439,7 @@ public final class CSVParser implements Iterable<CSVRecord>, Closeable {
}
}
@Override
public boolean hasNext() {
if (CSVParser.this.isClosed()) {
return false;
@ -448,6 +451,7 @@ public final class CSVParser implements Iterable<CSVRecord>, Closeable {
return this.current != null;
}
@Override
public CSVRecord next() {
if (CSVParser.this.isClosed()) {
throw new NoSuchElementException("CSVParser has been closed");
@ -466,6 +470,7 @@ public final class CSVParser implements Iterable<CSVRecord>, Closeable {
return next;
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}

View File

@ -83,6 +83,7 @@ public final class CSVPrinter implements Flushable, Closeable {
// printing implementation
// ======================================================
@Override
public void close() throws IOException {
if (out instanceof Closeable) {
((Closeable) out).close();
@ -95,6 +96,7 @@ public final class CSVPrinter implements Flushable, Closeable {
* @throws IOException
* If an I/O error occurs
*/
@Override
public void flush() throws IOException {
if (out instanceof Flushable) {
((Flushable) out).flush();

View File

@ -30,6 +30,7 @@ final class TokenMatchers {
public static Matcher<Token> hasType(final Token.Type expectedType) {
return new TypeSafeDiagnosingMatcher<Token>() {
@Override
public void describeTo(final Description description) {
description.appendText("token has type ");
description.appendValue(expectedType);
@ -48,6 +49,7 @@ final class TokenMatchers {
public static Matcher<Token> hasContent(final String expectedContent) {
return new TypeSafeDiagnosingMatcher<Token>() {
@Override
public void describeTo(final Description description) {
description.appendText("token has content ");
description.appendValue(expectedContent);
@ -66,6 +68,7 @@ final class TokenMatchers {
public static Matcher<Token> isReady() {
return new TypeSafeDiagnosingMatcher<Token>() {
@Override
public void describeTo(final Description description) {
description.appendText("token is ready ");
}