From 98f75b8d8def707fb05500a79c5a8e42e610a55a Mon Sep 17 00:00:00 2001 From: "ray.j.greenwell" Date: Wed, 25 Nov 2009 20:17:03 +0000 Subject: [PATCH] Per Dave Hoover: - 1.5 compatibility: Removed @Override on some methods that had no concrete implementation in superclasses. - Added @Override to a few places where there does happen to be an implementation in our abstract superclass. I now think the 1.6 behavior of @Override is more sensible, it's less special-casey. git-svn-id: https://samskivert.googlecode.com/svn/trunk@2653 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- src/java/com/samskivert/util/ArrayIntSet.java | 3 +-- src/java/com/samskivert/util/HashIntMap.java | 4 ++-- src/java/com/samskivert/util/IntIntMap.java | 8 ++++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/java/com/samskivert/util/ArrayIntSet.java b/src/java/com/samskivert/util/ArrayIntSet.java index 7117ec30..519f08db 100644 --- a/src/java/com/samskivert/util/ArrayIntSet.java +++ b/src/java/com/samskivert/util/ArrayIntSet.java @@ -22,7 +22,6 @@ package com.samskivert.util; import java.io.Serializable; -import java.util.AbstractSet; import java.util.Arrays; import java.util.Collection; import java.util.Iterator; @@ -232,7 +231,7 @@ public class ArrayIntSet extends AbstractIntSet } } - public void remove () { + @Override public void remove () { if (_pos == 0) { throw new IllegalStateException(); } diff --git a/src/java/com/samskivert/util/HashIntMap.java b/src/java/com/samskivert/util/HashIntMap.java index 168b6276..32fdd30d 100644 --- a/src/java/com/samskivert/util/HashIntMap.java +++ b/src/java/com/samskivert/util/HashIntMap.java @@ -396,7 +396,7 @@ public class HashIntMap extends AbstractMap // damn Sun bastards made the 'keySet' variable with default access, so we can't share it if (_keySet == null) { _keySet = new AbstractIntSet() { - @Override public Interator interator () { + public Interator interator () { return new AbstractInterator () { public boolean hasNext () { return i.hasNext(); @@ -404,7 +404,7 @@ public class HashIntMap extends AbstractMap public int nextInt () { return i.next().getIntKey(); } - public void remove () { + @Override public void remove () { i.remove(); } private Iterator> i = intEntrySet().iterator(); diff --git a/src/java/com/samskivert/util/IntIntMap.java b/src/java/com/samskivert/util/IntIntMap.java index def3b76b..af7aaf40 100644 --- a/src/java/com/samskivert/util/IntIntMap.java +++ b/src/java/com/samskivert/util/IntIntMap.java @@ -313,7 +313,7 @@ public class IntIntMap public IntSet keySet () { return new AbstractIntSet() { - @Override public Interator interator () { + public Interator interator () { return IntIntMap.this.keys(); } @@ -321,11 +321,11 @@ public class IntIntMap return IntIntMap.this.size(); } - public boolean contains (int t) { + @Override public boolean contains (int t) { return IntIntMap.this.containsKey(t); } - public boolean remove (int value) { + @Override public boolean remove (int value) { // we have to check for presence in the map separately because we have no "not in // the set" return value if (!IntIntMap.this.containsKey(value)) { @@ -566,7 +566,7 @@ public class IntIntMap return _eiter.hasNext(); } - public void remove () { + @Override public void remove () { _eiter.remove(); }