Author: j16sdiz
Date: 2008-04-09 16:01:47 +0000 (Wed, 09 Apr 2008)
New Revision: 19115

Modified:
   trunk/freenet/src/freenet/support/DoublyLinkedListImpl.java
Log:
restrict access and remove unused methods


Modified: trunk/freenet/src/freenet/support/DoublyLinkedListImpl.java
===================================================================
--- trunk/freenet/src/freenet/support/DoublyLinkedListImpl.java 2008-04-09 
16:01:28 UTC (rev 19114)
+++ trunk/freenet/src/freenet/support/DoublyLinkedListImpl.java 2008-04-09 
16:01:47 UTC (rev 19115)
@@ -353,68 +353,18 @@
     /**
      * @return  an Enumeration of list elements from head to tail
      */
-    public Enumeration forwardElements() {
+    private Enumeration forwardElements() {
         return new ForwardWalker();
     }

     /**
-     * @throws ClassCastException  if startAt is not a DoublyLinkedList.Item
-     */
-    public Enumeration forwardElements(Object startAt, boolean inclusive) {
-        return forwardElements((DoublyLinkedList.Item) startAt, inclusive);
-    }
-
-    /**
-     * @return  an Enumeration of list elements from head to tail
-     * @param startAt    the item to begin the walk at
-     * @param inclusive  whether to include startAt in the Enumeration
-     * @throws VirginItemException  if startAt is not a member of a 
DoublyLinkedList
-     *
-     * WARNING:  If startAt is an item of another DoublyLinkedList, it
-     *           will NOT be detected and the results will be unpredictable.
-     */
-    protected Enumeration forwardElements(DoublyLinkedList.Item startAt, 
boolean inclusive)
-                            throws VirginItemException, NoSuchElementException 
{
-
-        if ((startAt.getNext() == null) || (startAt.getPrev() == null))
-            throw new VirginItemException(startAt);
-        else
-            return new ForwardWalker(startAt, inclusive);
-    }
-
-    /**
      * @return  an Enumeration of list elements from tail to head
      */
-    public Enumeration reverseElements() {
+    protected Enumeration reverseElements() {
         return new ReverseWalker();
     }

-    /**
-     * @throws ClassCastException  if startAt is not a DoublyLinkedList.Item
-     */
-    public Enumeration reverseElements(Object startAt, boolean inclusive) {
-        return reverseElements((DoublyLinkedList.Item) startAt, inclusive);
-    }
-
-    /**
-     * @return  an Enumeration of list elements from tail to head
-     * @param startAt    the item to begin the walk at
-     * @param inclusive  whether to include startAt in the Enumeration
-     * @throws VirginItemException  if startAt is not a member of a 
DoublyLinkedList
-     *
-     * WARNING:  If startAt is an item of another DoublyLinkedList, it
-     *           will NOT be detected and the results will be unpredictable.
-     */
-    protected Enumeration reverseElements(DoublyLinkedList.Item startAt, 
boolean inclusive)
-                            throws VirginItemException, NoSuchElementException 
{
-
-        if ((startAt.getNext() == null) || (startAt.getPrev() == null))
-            throw new VirginItemException(startAt);
-        else
-            return new ReverseWalker(startAt, inclusive);
-    }
-
-    protected class ForwardWalker implements Enumeration {
+    private class ForwardWalker implements Enumeration {
         protected DoublyLinkedList.Item next;
         protected ForwardWalker() {
             next = _headptr.getNext();
@@ -435,7 +385,7 @@
         }
     }

-    protected class ReverseWalker implements Enumeration {
+    private class ReverseWalker implements Enumeration {
         protected DoublyLinkedList.Item next;
         protected ReverseWalker() {
             next = _tailptr.getPrev();
@@ -494,7 +444,4 @@
                        return old;
                }
     }
-}
-
-
-
+}
\ No newline at end of file


Reply via email to