Author: tfmorris
Date: 2007-11-23 11:20:30-0800
New Revision: 13821
Modified:
trunk/src_new/org/argouml/cognitive/ToDoList.java
trunk/src_new/org/argouml/cognitive/checklist/Checklist.java
Log:
Use Collections.enumeration()
Modified: trunk/src_new/org/argouml/cognitive/ToDoList.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/cognitive/ToDoList.java?view=diff&rev=13821&p1=trunk/src_new/org/argouml/cognitive/ToDoList.java&p2=trunk/src_new/org/argouml/cognitive/ToDoList.java&r1=13820&r2=13821
==============================================================================
--- trunk/src_new/org/argouml/cognitive/ToDoList.java (original)
+++ trunk/src_new/org/argouml/cognitive/ToDoList.java 2007-11-23 11:20:30-0800
@@ -24,6 +24,7 @@
package org.argouml.cognitive;
+import java.util.Collections;
import java.util.Enumeration;
import java.util.ArrayList;
import java.util.Iterator;
@@ -133,8 +134,6 @@
*/
private boolean isPaused;
- ////////////////////////////////////////////////////////////////
- // constructor
/**
* Creates a new todolist. The only ToDoList is owned by the Designer.
@@ -307,9 +306,6 @@
super.notifyObservers();
}
- ////////////////////////////////////////////////////////////////
- // accessors
-
/**
* @return the todo items
* @deprecated for 0.25.4 by tfmorris
@@ -572,7 +568,10 @@
/**
* @param off the offender
* @return the todo tems for this offender
+ * @deprecated for 0.25.4 by tfmorris. Use
+ * {@link #elementListForOffender(Object)}.
*/
+ @Deprecated
public Vector<ToDoItem> elementsForOffender(Object off) {
return new Vector<ToDoItem>(elementListForOffender(off));
}
@@ -610,7 +609,7 @@
*/
@Deprecated
public Enumeration<ToDoItem> elements() {
- return new Vector<ToDoItem>(items).elements();
+ return Collections.enumeration(items);
}
/**
Modified: trunk/src_new/org/argouml/cognitive/checklist/Checklist.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/cognitive/checklist/Checklist.java?view=diff&rev=13821&p1=trunk/src_new/org/argouml/cognitive/checklist/Checklist.java&p2=trunk/src_new/org/argouml/cognitive/checklist/Checklist.java&r1=13820&r2=13821
==============================================================================
--- trunk/src_new/org/argouml/cognitive/checklist/Checklist.java (original)
+++ trunk/src_new/org/argouml/cognitive/checklist/Checklist.java 2007-11-23 11:20:30-0800
@@ -26,13 +26,14 @@
import java.io.Serializable;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
import java.util.Vector;
/**
* A Checklist is basically a list of CheckItems. It also provides
- * some convience functions for adding trivial CheckItems (ones that
+ * some convenience functions for adding trivial CheckItems (ones that
* have no predicate).
*
* In ArgoUML, Checklists are shown in the TabChecklist panel.
@@ -108,12 +109,12 @@
}
/**
- * @return the list in enumeration format
+ * @return an enumeration of the list
* @deprecated for 0.25.4 by tfmorris.
*/
@Deprecated
public Enumeration<CheckItem> elements() {
- return new Vector<CheckItem>(this).elements();
+ return Collections.enumeration(this);
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.