You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2009/11/26 14:58:18 UTC

svn commit: r884558 - in /incubator/pivot/trunk: core/src/org/apache/pivot/beans/ core/src/org/apache/pivot/collections/ core/src/org/apache/pivot/collections/adapter/ core/src/org/apache/pivot/collections/concurrent/ core/src/org/apache/pivot/collecti...

Author: gbrown
Date: Thu Nov 26 13:58:16 2009
New Revision: 884558

URL: http://svn.apache.org/viewvc?rev=884558&view=rev
Log:
Promote isEmpty() to Collection and remove from Dictionary and Group.

Modified:
    incubator/pivot/trunk/core/src/org/apache/pivot/beans/BeanDictionary.java
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/ArrayList.java
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/ArrayQueue.java
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/ArrayStack.java
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/Collection.java
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/Dictionary.java
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/EnumList.java
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/FilteredList.java
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/Group.java
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/LinkedList.java
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/LinkedQueue.java
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/LinkedStack.java
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/List.java
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/MapList.java
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/Queue.java
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/Stack.java
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/adapter/ListAdapter.java
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedList.java
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedQueue.java
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedStack.java
    incubator/pivot/trunk/core/src/org/apache/pivot/collections/immutable/ImmutableList.java
    incubator/pivot/trunk/core/src/org/apache/pivot/util/MIMEType.java
    incubator/pivot/trunk/core/src/org/apache/pivot/util/Resources.java
    incubator/pivot/trunk/core/src/org/apache/pivot/util/concurrent/TaskGroup.java
    incubator/pivot/trunk/core/src/org/apache/pivot/xml/Element.java
    incubator/pivot/trunk/core/test/org/apache/pivot/collections/test/StackTest.java
    incubator/pivot/trunk/core/test/org/apache/pivot/util/test/ParentResourcesTest.java
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/rss/NodeListAdapter.java
    incubator/pivot/trunk/tools/src/org/apache/pivot/tools/wtk/EventLogger.java
    incubator/pivot/trunk/web/src/org/apache/pivot/web/QueryDictionary.java
    incubator/pivot/trunk/web/test/org/apache/pivot/web/test/QueryDictionaryTest.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Action.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ButtonGroup.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/CalendarDateSpinnerData.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/NumericSpinnerData.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewMultiCellRenderer.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeBranch.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtkx/WTKXSerializer.java
    incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/text/test/ElementAdapter.java

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/beans/BeanDictionary.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/beans/BeanDictionary.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/beans/BeanDictionary.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/beans/BeanDictionary.java Thu Nov 26 13:58:16 2009
@@ -446,18 +446,6 @@
     }
 
     /**
-     * Verifies that the bean contains at least one property.
-     */
-    @Override
-    public boolean isEmpty() {
-        if (bean == null) {
-            throw new IllegalStateException("bean is null.");
-        }
-
-        return !iterator().hasNext();
-    }
-
-    /**
      * Tests the read-only state of a property.
      *
      * @param key

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=884558&r1=884557&r2=884558&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 Thu Nov 26 13:58:16 2009
@@ -377,6 +377,11 @@
     }
 
     @Override
+    public boolean isEmpty() {
+        return (length == 0);
+    }
+
+    @Override
     public int getLength() {
         return length;
     }

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/ArrayQueue.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/ArrayQueue.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/ArrayQueue.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/ArrayQueue.java Thu Nov 26 13:58:16 2009
@@ -94,6 +94,11 @@
         return (arrayList.getLength() == 0);
     }
 
+    @Override
+    public int getLength() {
+        return arrayList.getLength();
+    }
+
     public void ensureCapacity(int capacity) {
         arrayList.ensureCapacity(capacity);
     }

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/ArrayStack.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/ArrayStack.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/ArrayStack.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/ArrayStack.java Thu Nov 26 13:58:16 2009
@@ -85,6 +85,11 @@
     }
 
     @Override
+    public boolean isEmpty() {
+        return (arrayList.getLength() == 0);
+    }
+
+    @Override
     public int getDepth() {
         return arrayList.getLength();
     }

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/Collection.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/Collection.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/Collection.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/Collection.java Thu Nov 26 13:58:16 2009
@@ -29,6 +29,11 @@
     public void clear();
 
     /**
+     * Tests the emptiness of the collection.
+     */
+    public boolean isEmpty();
+
+    /**
      * Returns the collection's sort order.
      *
      * @return

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/Dictionary.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/Dictionary.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/Dictionary.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/Dictionary.java Thu Nov 26 13:58:16 2009
@@ -112,13 +112,4 @@
      * otherwise.
      */
     public boolean containsKey(K key);
-
-    /**
-     * Tests the emptiness of the dictionary.
-     *
-     * @return
-     * <tt>true</tt> if the dictionary contains no keys; <tt>false</tt>,
-     * otherwise.
-     */
-    public boolean isEmpty();
 }

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/EnumList.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/EnumList.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/EnumList.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/EnumList.java Thu Nov 26 13:58:16 2009
@@ -115,6 +115,11 @@
     }
 
     @Override
+    public boolean isEmpty() {
+        return (items.length == 0);
+    }
+
+    @Override
     public int getLength() {
         return items.length;
     }

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/FilteredList.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/FilteredList.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/FilteredList.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/FilteredList.java Thu Nov 26 13:58:16 2009
@@ -477,6 +477,11 @@
     }
 
     @Override
+    public boolean isEmpty() {
+        return (view == null) ? true : (view.isEmpty());
+    }
+
+    @Override
     public int getLength() {
         return (view == null) ? 0 : view.getLength();
     }

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/Group.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/Group.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/Group.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/Group.java Thu Nov 26 13:58:16 2009
@@ -55,13 +55,4 @@
      * otherwise.
      */
     public boolean contains(E element);
-
-    /**
-     * Tests the emptiness of the group.
-     *
-     * @return
-     * <tt>true</tt> if the group contains no elements; <tt>false</tt>,
-     * otherwise.
-     */
-    public boolean isEmpty();
 }

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/LinkedList.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/LinkedList.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/LinkedList.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/LinkedList.java Thu Nov 26 13:58:16 2009
@@ -527,6 +527,11 @@
     }
 
     @Override
+    public boolean isEmpty() {
+        return (length == 0);
+    }
+
+    @Override
     public int getLength() {
         return length;
     }

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/LinkedQueue.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/LinkedQueue.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/LinkedQueue.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/LinkedQueue.java Thu Nov 26 13:58:16 2009
@@ -91,6 +91,11 @@
     }
 
     @Override
+    public int getLength() {
+        return linkedList.getLength();
+    }
+
+    @Override
     public Comparator<T> getComparator() {
         return linkedList.getComparator();
     }

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/LinkedStack.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/LinkedStack.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/LinkedStack.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/LinkedStack.java Thu Nov 26 13:58:16 2009
@@ -80,6 +80,11 @@
     }
 
     @Override
+    public boolean isEmpty() {
+        return (linkedList.getLength() == 0);
+    }
+
+    @Override
     public int getDepth() {
         return linkedList.getLength();
     }

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/List.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/List.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/List.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/List.java Thu Nov 26 13:58:16 2009
@@ -145,7 +145,8 @@
     /**
      * Returns the length of the list.
      *
-     * @return The number of items in the list, or -1 if the list's length is
+     * @return
+     * The number of items in the list, or -1 if the list's length is
      * not known. In this case, the iterator must be used to retrieve the
      * contents of the list.
      */

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/MapList.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/MapList.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/MapList.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/MapList.java Thu Nov 26 13:58:16 2009
@@ -365,6 +365,14 @@
      * {@inheritDoc}
      */
     @Override
+    public boolean isEmpty() {
+        return view.isEmpty();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
     public int getLength() {
         return view.getLength();
     }

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/Queue.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/Queue.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/Queue.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/Queue.java Thu Nov 26 13:58:16 2009
@@ -95,6 +95,11 @@
     public boolean isEmpty();
 
     /**
+     * Returns the length of the queue.
+     */
+    public int getLength();
+
+    /**
      * Returns the queue listener list.
      */
     public ListenerList<QueueListener<T>> getQueueListeners();

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/Stack.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/Stack.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/Stack.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/Stack.java Thu Nov 26 13:58:16 2009
@@ -86,6 +86,15 @@
     public T peek();
 
     /**
+     * Tests the emptiness of the stack.
+     *
+     * @return
+     * <tt>true</tt> if the stack contains no items; <tt>false</tt>,
+     * otherwise.
+     */
+    public boolean isEmpty();
+
+    /**
      * Returns the stack depth.
      */
     public int getDepth();

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/adapter/ListAdapter.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/adapter/ListAdapter.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/adapter/ListAdapter.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/adapter/ListAdapter.java Thu Nov 26 13:58:16 2009
@@ -212,6 +212,11 @@
     }
 
     @Override
+    public boolean isEmpty() {
+        return (list.isEmpty());
+    }
+
+    @Override
     public int getLength() {
         return list.size();
     }

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedList.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedList.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedList.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedList.java Thu Nov 26 13:58:16 2009
@@ -143,6 +143,11 @@
     }
 
     @Override
+    public boolean isEmpty() {
+        return list.isEmpty();
+    }
+
+    @Override
     public synchronized int getLength() {
         return list.getLength();
     }

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedQueue.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedQueue.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedQueue.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedQueue.java Thu Nov 26 13:58:16 2009
@@ -105,6 +105,11 @@
     }
 
     @Override
+    public int getLength() {
+        return queue.getLength();
+    }
+
+    @Override
     public synchronized Comparator<T> getComparator() {
         return queue.getComparator();
     }

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedStack.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedStack.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedStack.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/concurrent/SynchronizedStack.java Thu Nov 26 13:58:16 2009
@@ -74,7 +74,7 @@
     public synchronized T pop() {
         T item = null;
         try {
-            while (stack.getDepth() == 0) {
+            while (stack.isEmpty()) {
                 wait();
             }
 
@@ -94,13 +94,18 @@
 
     @Override
     public synchronized void clear() {
-        if (stack.getDepth() > 0) {
+        if (!stack.isEmpty()) {
             stack.clear();
             stackListeners.stackCleared(this);
         }
     }
 
     @Override
+    public synchronized boolean isEmpty() {
+        return stack.isEmpty();
+    }
+
+    @Override
     public synchronized int getDepth() {
         return stack.getDepth();
     }

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/collections/immutable/ImmutableList.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/collections/immutable/ImmutableList.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/collections/immutable/ImmutableList.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/collections/immutable/ImmutableList.java Thu Nov 26 13:58:16 2009
@@ -81,6 +81,11 @@
     }
 
     @Override
+    public boolean isEmpty() {
+        return list.isEmpty();
+    }
+
+    @Override
     public int getLength() {
         return list.getLength();
     }

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/util/MIMEType.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/util/MIMEType.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/util/MIMEType.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/util/MIMEType.java Thu Nov 26 13:58:16 2009
@@ -62,11 +62,6 @@
     }
 
     @Override
-    public boolean isEmpty() {
-        return parameters.isEmpty();
-    }
-
-    @Override
     public Iterator<String> iterator() {
         return new ImmutableIterator<String>(parameters.iterator());
     }

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/util/Resources.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/util/Resources.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/util/Resources.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/util/Resources.java Thu Nov 26 13:58:16 2009
@@ -333,15 +333,6 @@
     }
 
     @Override
-    public boolean isEmpty() {
-        boolean empty = resourceMap.isEmpty();
-        if (empty && parent != null) {
-            return parent.isEmpty();
-        }
-        return empty;
-    }
-
-    @Override
     public Iterator<String> iterator() {
         return new ImmutableIterator<String>(resourceMap.iterator());
     }

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/util/concurrent/TaskGroup.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/util/concurrent/TaskGroup.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/util/concurrent/TaskGroup.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/util/concurrent/TaskGroup.java Thu Nov 26 13:58:16 2009
@@ -112,11 +112,6 @@
     }
 
     @Override
-    public boolean isEmpty() {
-        return tasks.isEmpty();
-    }
-
-    @Override
     public Iterator<Task<?>> iterator() {
         return new ImmutableIterator<Task<?>>(tasks.iterator());
     }

Modified: incubator/pivot/trunk/core/src/org/apache/pivot/xml/Element.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/src/org/apache/pivot/xml/Element.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/src/org/apache/pivot/xml/Element.java (original)
+++ incubator/pivot/trunk/core/src/org/apache/pivot/xml/Element.java Thu Nov 26 13:58:16 2009
@@ -353,18 +353,6 @@
         }
 
         /**
-         * Determines if this element declares any namespaces.
-         *
-         * @return
-         * <tt>true</tt> if this element does not declare any namespaces;
-         * <tt>false</tt> if the element declares at least one namespace.
-         */
-        @Override
-        public boolean isEmpty() {
-            return namespaces.isEmpty();
-        }
-
-        /**
          * Returns an iterator over the element's namespace prefixes.
          */
         @Override

Modified: incubator/pivot/trunk/core/test/org/apache/pivot/collections/test/StackTest.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/test/org/apache/pivot/collections/test/StackTest.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/test/org/apache/pivot/collections/test/StackTest.java (original)
+++ incubator/pivot/trunk/core/test/org/apache/pivot/collections/test/StackTest.java Thu Nov 26 13:58:16 2009
@@ -41,7 +41,7 @@
         }
 
         i = 4;
-        while (stack.getDepth() > 0) {
+        while (!stack.isEmpty()) {
             String s = stack.pop();
             char c = s.charAt(0);
             c -= i;

Modified: incubator/pivot/trunk/core/test/org/apache/pivot/util/test/ParentResourcesTest.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/core/test/org/apache/pivot/util/test/ParentResourcesTest.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/core/test/org/apache/pivot/util/test/ParentResourcesTest.java (original)
+++ incubator/pivot/trunk/core/test/org/apache/pivot/util/test/ParentResourcesTest.java Thu Nov 26 13:58:16 2009
@@ -106,7 +106,6 @@
     public void testMyMap() {
         assertFalse("not contains noMap", main.containsKey("noMap"));
         assertTrue("contains myMap", main.containsKey("myMap"));
-        assertFalse("empty map", main.isEmpty());
         assertNotNull("myMap as object not null", main.get("myMap"));
         assertNull("noMap as map is null", main.getMap("noMap"));
         assertNotNull("myMap as map not null", main.getMap("myMap"));

Modified: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/rss/NodeListAdapter.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/rss/NodeListAdapter.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/rss/NodeListAdapter.java (original)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/rss/NodeListAdapter.java Thu Nov 26 13:58:16 2009
@@ -114,6 +114,11 @@
     }
 
     @Override
+    public boolean isEmpty() {
+        return (nodeList.getLength() == 0);
+    }
+
+    @Override
     public int getLength() {
         return nodeList.getLength();
     }

Modified: incubator/pivot/trunk/tools/src/org/apache/pivot/tools/wtk/EventLogger.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tools/src/org/apache/pivot/tools/wtk/EventLogger.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/tools/src/org/apache/pivot/tools/wtk/EventLogger.java (original)
+++ incubator/pivot/trunk/tools/src/org/apache/pivot/tools/wtk/EventLogger.java Thu Nov 26 13:58:16 2009
@@ -74,11 +74,6 @@
         }
 
         @Override
-        public boolean isEmpty() {
-            return declaredEvents.isEmpty();
-        }
-
-        @Override
         public Iterator<Method> iterator() {
             return new ImmutableIterator<Method>(declaredEvents.iterator());
         }
@@ -128,11 +123,6 @@
         }
 
         @Override
-        public boolean isEmpty() {
-            return includeEvents.isEmpty();
-        }
-
-        @Override
         public Iterator<Method> iterator() {
             return new ImmutableIterator<Method>(includeEvents.iterator());
         }

Modified: incubator/pivot/trunk/web/src/org/apache/pivot/web/QueryDictionary.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/web/src/org/apache/pivot/web/QueryDictionary.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/web/src/org/apache/pivot/web/QueryDictionary.java (original)
+++ incubator/pivot/trunk/web/src/org/apache/pivot/web/QueryDictionary.java Thu Nov 26 13:58:16 2009
@@ -109,10 +109,6 @@
         return map.containsKey(key);
     }
 
-    @Override
-    public boolean isEmpty() {
-        return map.isEmpty();
-    }
 
     public int getLength(String key) {
         ArrayList<String> list = map.get(key);

Modified: incubator/pivot/trunk/web/test/org/apache/pivot/web/test/QueryDictionaryTest.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/web/test/org/apache/pivot/web/test/QueryDictionaryTest.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/web/test/org/apache/pivot/web/test/QueryDictionaryTest.java (original)
+++ incubator/pivot/trunk/web/test/org/apache/pivot/web/test/QueryDictionaryTest.java Thu Nov 26 13:58:16 2009
@@ -17,7 +17,6 @@
 package org.apache.pivot.web.test;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
@@ -83,10 +82,7 @@
         assertEquals(0, validKeys.size());
 
         assertTrue(dict.containsKey("key2"));
-        assertFalse(dict.isEmpty());
 
         dict.clear();
-        assertTrue(dict.isEmpty());
-
     }
 }

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Action.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Action.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Action.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Action.java Thu Nov 26 13:58:16 2009
@@ -79,11 +79,6 @@
         }
 
         @Override
-        public boolean isEmpty() {
-            return namedActions.isEmpty();
-        }
-
-        @Override
         public Iterator<String> iterator() {
             return new ImmutableIterator<String>(namedActions.iterator());
         }

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java Thu Nov 26 13:58:16 2009
@@ -1376,11 +1376,6 @@
         }
 
         @Override
-        public boolean isEmpty() {
-            return resourceCache.isEmpty();
-        }
-
-        @Override
         public Iterator<URL> iterator() {
             return new Iterator<URL>() {
                 private Iterator<URI> iterator = resourceCache.iterator();

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ButtonGroup.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ButtonGroup.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ButtonGroup.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ButtonGroup.java Thu Nov 26 13:58:16 2009
@@ -102,11 +102,6 @@
         return buttons.contains(button);
     }
 
-    @Override
-    public boolean isEmpty() {
-        return buttons.isEmpty();
-    }
-
     public Button getSelection() {
         return selection;
     }

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java Thu Nov 26 13:58:16 2009
@@ -90,11 +90,6 @@
             return styles.containsKey(key);
         }
 
-        @Override
-        public boolean isEmpty() {
-            return styles.isEmpty();
-        }
-
         public boolean isReadOnly(String key) {
             return styles.isReadOnly(key);
         }
@@ -155,11 +150,6 @@
         }
 
         @Override
-        public boolean isEmpty() {
-            return userData.isEmpty();
-        }
-
-        @Override
         public Iterator<String> iterator() {
             return new ImmutableIterator<String>(userData.iterator());
         }

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/CalendarDateSpinnerData.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/CalendarDateSpinnerData.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/CalendarDateSpinnerData.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/CalendarDateSpinnerData.java Thu Nov 26 13:58:16 2009
@@ -210,6 +210,11 @@
         throw new UnsupportedOperationException();
     }
 
+    @Override
+    public boolean isEmpty() {
+        return (length == 0);
+    }
+
     /**
      * Gets the number of entries in this list.
      *

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/NumericSpinnerData.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/NumericSpinnerData.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/NumericSpinnerData.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/NumericSpinnerData.java Thu Nov 26 13:58:16 2009
@@ -196,6 +196,11 @@
     }
 
     @Override
+    public boolean isEmpty() {
+        return (getLength() == 0);
+    }
+
+    @Override
     public int getLength() {
         return ((upperBound - lowerBound) / increment) + 1;
     }

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewMultiCellRenderer.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewMultiCellRenderer.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewMultiCellRenderer.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewMultiCellRenderer.java Thu Nov 26 13:58:16 2009
@@ -56,11 +56,6 @@
         public boolean containsKey(String key) {
             return false;
         }
-
-        @Override
-        public boolean isEmpty() {
-            return true;
-        }
     }
 
     /**

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeBranch.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeBranch.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeBranch.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeBranch.java Thu Nov 26 13:58:16 2009
@@ -127,6 +127,11 @@
     }
 
     @Override
+    public boolean isEmpty() {
+        return treeNodes.isEmpty();
+    }
+
+    @Override
     public int getLength() {
         return treeNodes.getLength();
     }

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtkx/WTKXSerializer.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtkx/WTKXSerializer.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtkx/WTKXSerializer.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtkx/WTKXSerializer.java Thu Nov 26 13:58:16 2009
@@ -1160,7 +1160,6 @@
         return containsKey;
     }
 
-    @Override
     public boolean isEmpty() {
         return namedObjects.isEmpty()
             && namedSerializers.isEmpty();

Modified: incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/text/test/ElementAdapter.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/text/test/ElementAdapter.java?rev=884558&r1=884557&r2=884558&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/text/test/ElementAdapter.java (original)
+++ incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/text/test/ElementAdapter.java Thu Nov 26 13:58:16 2009
@@ -147,6 +147,11 @@
     }
 
     @Override
+    public boolean isEmpty() {
+        return (nodeAdapters.getLength() == 0);
+    }
+
+    @Override
     public int getLength() {
         return nodeAdapters.getLength();
     }