You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by sm...@apache.org on 2009/09/01 11:23:55 UTC

svn commit: r809925 - /incubator/pivot/trunk/core/src/org/apache/pivot/collections/ArrayList.java

Author: smartini
Date: Tue Sep  1 09:23:55 2009
New Revision: 809925

URL: http://svn.apache.org/viewvc?rev=809925&view=rev
Log:
add some missing override, in some cases on methods of inner classes (not shown in eclipse warnings)

Modified:
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/ArrayList.java

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/ArrayList.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/ArrayList.java?rev=809925&r1=809924&r2=809925&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/ArrayList.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/ArrayList.java Tue Sep  1 09:23:55 2009
@@ -41,10 +41,12 @@
             length = ArrayList.this.length;
         }
 
+        @Override
         public boolean hasNext() {
             return (index < getLength());
         }
 
+        @Override
         public T next() {
             if (!hasNext()) {
                 throw new NoSuchElementException();
@@ -57,10 +59,12 @@
             return get(index++);
         }
 
+        @Override
         public boolean hasPrevious() {
             return (index >= 0);
         }
 
+        @Override
         public T previous() {
             if (!hasPrevious()) {
                 throw new NoSuchElementException();
@@ -73,6 +77,7 @@
             return get(index--);
         }
 
+        @Override
         public void insert(T item) {
             if (index < 0
                 || index >= ArrayList.this.length) {
@@ -83,6 +88,7 @@
             length++;
         }
 
+        @Override
         public void update(T item) {
             if (index < 0
                 || index >= ArrayList.this.length) {
@@ -92,6 +98,7 @@
             ArrayList.this.update(index, item);
         }
 
+        @Override
         public void remove() {
             if (index < 0
                 || index >= ArrayList.this.length) {
@@ -181,6 +188,7 @@
         length = count;
     }
 
+    @Override
     public int add(T item) {
         int index = -1;
 
@@ -201,6 +209,7 @@
         return index;
     }
 
+    @Override
     public void insert(T item, int index) {
         insert(item, index, true);
     }
@@ -236,6 +245,7 @@
     }
 
     @SuppressWarnings("unchecked")
+    @Override
     public T update(int index, T item) {
         if (index < 0
             || index >= length) {
@@ -260,6 +270,7 @@
         return previousItem;
     }
 
+    @Override
     public int remove(T item) {
         int index = indexOf(item);
 
@@ -271,6 +282,7 @@
     }
 
     @SuppressWarnings("unchecked")
+    @Override
     public Sequence<T> remove(int index, int count) {
         if (index < 0
             || index + count > length) {
@@ -299,6 +311,7 @@
         return removed;
     }
 
+    @Override
     public void clear() {
         if (length > 0) {
             items = new Object[items.length];
@@ -311,6 +324,7 @@
     }
 
     @SuppressWarnings("unchecked")
+    @Override
     public T get(int index) {
         if (index < 0
             || index >= length) {
@@ -320,6 +334,7 @@
         return (T)items[index];
     }
 
+    @Override
     public int indexOf(T item) {
         int index = -1;
 
@@ -356,6 +371,7 @@
         return index;
     }
 
+    @Override
     public int getLength() {
         return length;
     }
@@ -386,10 +402,12 @@
         return Arrays.copyOf(items, length, type);
     }
 
+    @Override
     public Comparator<T> getComparator() {
         return comparator;
     }
 
+    @Override
     public void setComparator(Comparator<T> comparator) {
         Comparator<T> previousComparator = this.comparator;
 
@@ -407,10 +425,12 @@
         }
     }
 
+    @Override
     public ItemIterator<T> iterator() {
         return new ArrayListItemIterator();
     }
 
+    @Override
     public ListenerList<ListListener<T>> getListListeners() {
         if (listListeners == null) {
             listListeners = new ListListenerList<T>();
@@ -490,6 +510,7 @@
     public static <T extends Comparable<? super T>> int binarySearch(ArrayList<T> arrayList,
         T item) {
         return binarySearch(arrayList, item, new Comparator<T>() {
+            @Override
             public int compare(T t1, T t2) {
                 return t1.compareTo(t2);
             }