From 48e1150886360f512bd54bd2bcdf77f31bbf91d8 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Fri, 19 Jul 2013 02:33:25 +0200 Subject: [PATCH] Add removeAll and merge methods. --- src/fr/devinsy/util/StringList.java | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/fr/devinsy/util/StringList.java b/src/fr/devinsy/util/StringList.java index 0243e6f..4d9320d 100755 --- a/src/fr/devinsy/util/StringList.java +++ b/src/fr/devinsy/util/StringList.java @@ -318,6 +318,37 @@ public class StringList extends ArrayList return (result); } + /** + * + */ + public StringList merge() + { + StringList result; + + String merge = this.toString(); + + removeAll(); + add(merge); + + // + result = this; + return result; + } + + /** + * + */ + public StringList removeAll() + { + StringList result; + + removeRange(0, this.size() - 1); + + // + result = this; + return result; + } + /** * */