Skip to content

Commit

Permalink
refact: remove unused SuppressWarnings annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Mar 1, 2024
1 parent df3a013 commit e57d247
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@
/**
* Representation of tuple types.
*/
@SuppressWarnings("all")
public interface Tuple {

static <F, S> Two<F, S> two(F first, S second) {
return new Two<>(first, second);
}

/**
* A two-tuple, i.e. a pair.
*/
public static class Two<F extends Object, S extends Object> implements Tuple {

private final F first;
private final S second;

Expand All @@ -39,7 +38,7 @@ public boolean equals(final Object obj) {
return false;
if (getClass() != obj.getClass())
return false;
Tuple.Two<?, ?> other = (Tuple.Two<?, ?>) obj;
final var other = (Tuple.Two<?, ?>) obj;
if (this.first == null) {
if (other.first != null)
return false;
Expand All @@ -63,11 +62,11 @@ public int hashCode() {

@Override
public String toString() {
StringBuilder builder = new StringBuilder("Tuples.Two [").append(System.lineSeparator());
final var builder = new StringBuilder("Tuples.Two [").append(System.lineSeparator());
builder.append(" first = ").append(first).append(System.lineSeparator());
builder.append(" second = ").append(second).append(System.lineSeparator());
return builder.append("]").toString();
}
}

}

0 comments on commit e57d247

Please sign in to comment.