summaryrefslogtreecommitdiff
path: root/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/LightWeightHashSet.java
diff options
context:
space:
mode:
authorHarsh J <harsh@apache.org>2012-07-16 02:58:03 +0000
committerHarsh J <harsh@apache.org>2012-07-16 02:58:03 +0000
commit0e8e499ff482c165d21c8e4f5ff9c33f306ca0d9 (patch)
tree0b57c6e0699d778c3578cbba1c87078fceddeaa2 /hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/LightWeightHashSet.java
parentae6cc14611a5898ed637a2e0f9df559f6c29093e (diff)
HDFS-3659. Add missing @Override to methods across the hadoop-hdfs project. Contributed by Brandon Li. (harsh)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1361894 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/LightWeightHashSet.java')
-rw-r--r--hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/LightWeightHashSet.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/LightWeightHashSet.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/LightWeightHashSet.java
index 90471bba58..5fa50003e1 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/LightWeightHashSet.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/LightWeightHashSet.java
@@ -55,6 +55,7 @@ public class LightWeightHashSet<T> implements Collection<T> {
this.hashCode = hash;
}
+ @Override
public String toString() {
return element.toString();
}
@@ -142,6 +143,7 @@ public class LightWeightHashSet<T> implements Collection<T> {
*
* @return true is set empty, false otherwise
*/
+ @Override
public boolean isEmpty() {
return size == 0;
}
@@ -156,6 +158,7 @@ public class LightWeightHashSet<T> implements Collection<T> {
/**
* Return the number of stored elements.
*/
+ @Override
public int size() {
return size;
}
@@ -217,6 +220,7 @@ public class LightWeightHashSet<T> implements Collection<T> {
* @param toAdd - elements to add.
* @return true if the set has changed, false otherwise
*/
+ @Override
public boolean addAll(Collection<? extends T> toAdd) {
boolean changed = false;
for (T elem : toAdd) {
@@ -231,6 +235,7 @@ public class LightWeightHashSet<T> implements Collection<T> {
*
* @return true if the element was not present in the table, false otherwise
*/
+ @Override
public boolean add(final T element) {
boolean added = addElem(element);
expandIfNecessary();
@@ -270,6 +275,7 @@ public class LightWeightHashSet<T> implements Collection<T> {
*
* @return If such element exists, return true. Otherwise, return false.
*/
+ @Override
@SuppressWarnings("unchecked")
public boolean remove(final Object key) {
// validate key
@@ -489,6 +495,7 @@ public class LightWeightHashSet<T> implements Collection<T> {
}
}
+ @Override
public Iterator<T> iterator() {
return new LinkedSetIterator();
}
@@ -560,6 +567,7 @@ public class LightWeightHashSet<T> implements Collection<T> {
/**
* Clear the set. Resize it to the original capacity.
*/
+ @Override
@SuppressWarnings("unchecked")
public void clear() {
this.capacity = this.initialCapacity;