From 1c521d757cd51512fa1d336bebcbb84b86a1f775 Mon Sep 17 00:00:00 2001 From: amontano Date: Mon, 25 Apr 2005 09:34:14 +0000 Subject: [PATCH] added more methods --- source/org/thdl/util/SimplifiedLinkedList.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/source/org/thdl/util/SimplifiedLinkedList.java b/source/org/thdl/util/SimplifiedLinkedList.java index 44f939d..b9527ac 100644 --- a/source/org/thdl/util/SimplifiedLinkedList.java +++ b/source/org/thdl/util/SimplifiedLinkedList.java @@ -198,6 +198,24 @@ public class SimplifiedLinkedList return array; } + public String[] toReverseStringArray() + { + int n = size(); + if (n==0) return null; + Object o; + String array[] = new String[n]; + SimplifiedListIterator li = listIterator(); + n=0; + while (li.hasNext()) + { + o = li.next(); + if (o==null) array[n]=null; + else array[n] = o.toString(); + n++; + } + return array; + } + public void write(PrintWriter pw) { SimplifiedListIterator li = listIterator();