diff options
| author | Michael Williamson <mike@zwobble.org> | 2018-01-28 12:36:26 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2018-01-28 12:36:26 +0000 |
| commit | 56e424be69f5728d36ed59509284e6592ee374ce (patch) | |
| tree | c66d20ce4bb0d68518bf7d5fff839913f0fe4866 /Mammoth/Couscous/java/util/ArrayList.cs | |
| parent | c5f9b5e6971da9611b599991858e9c4dd23ee008 (diff) | |
Update java-mammoth
Diffstat (limited to 'Mammoth/Couscous/java/util/ArrayList.cs')
| -rw-r--r-- | Mammoth/Couscous/java/util/ArrayList.cs | 13 |
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(); + } } } |
