summaryrefslogtreecommitdiff
path: root/Mammoth/Couscous/java/util/ArrayList.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Mammoth/Couscous/java/util/ArrayList.cs')
-rw-r--r--Mammoth/Couscous/java/util/ArrayList.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/Mammoth/Couscous/java/util/ArrayList.cs b/Mammoth/Couscous/java/util/ArrayList.cs
index 81d180c..2bd3031 100644
--- a/Mammoth/Couscous/java/util/ArrayList.cs
+++ b/Mammoth/Couscous/java/util/ArrayList.cs
@@ -39,6 +39,15 @@ namespace Mammoth.Couscous.java.util {
}
}
+ public List<T> subList(int fromIndex, int toIndex) {
+ var list = _list as System.Collections.Generic.List<T>;
+ if (list == null) {
+ throw new System.NotImplementedException();
+ } else {
+ return new ArrayList<T>(list.GetRange(fromIndex, toIndex - fromIndex));
+ }
+ }
+
public void add(T value) {
_list.Add(value);
}
@@ -52,5 +61,9 @@ namespace Mammoth.Couscous.java.util {
public void set(int index, T value) {
_list[index] = value;
}
+
+ public void clear() {
+ _list.Clear();
+ }
}
}