aboutsummaryrefslogtreecommitdiff
path: root/dotnet/Mammoth/Couscous/java/util/ArrayList.cs
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-06-04 16:03:56 +0100
committerMichael Williamson <mike@zwobble.org>2016-06-04 16:03:56 +0100
commit45e530dceda42282fae56b4c4f5fa7865f57899d (patch)
tree685868f4bf78c64e851cbcdafd674e887bc782a5 /dotnet/Mammoth/Couscous/java/util/ArrayList.cs
parentb5a83b1cb96d410e325ff8b733d550295376d8c7 (diff)
Remove dotnet (use submodule from dotnet repo instead)
Diffstat (limited to 'dotnet/Mammoth/Couscous/java/util/ArrayList.cs')
-rw-r--r--dotnet/Mammoth/Couscous/java/util/ArrayList.cs49
1 files changed, 0 insertions, 49 deletions
diff --git a/dotnet/Mammoth/Couscous/java/util/ArrayList.cs b/dotnet/Mammoth/Couscous/java/util/ArrayList.cs
deleted file mode 100644
index 4414123..0000000
--- a/dotnet/Mammoth/Couscous/java/util/ArrayList.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using Mammoth.Couscous.java.lang;
-using Mammoth.Couscous.java.util;
-
-namespace Mammoth.Couscous.java.util {
- internal class ArrayList<T> : List<T> {
- private readonly System.Collections.Generic.IList<T> _list;
-
- internal ArrayList() : this(new System.Collections.Generic.List<T>()) {
- }
-
- internal ArrayList(System.Collections.Generic.IList<T> list) {
- _list = list;
- }
-
- public Iterator<T> iterator() {
- return ToJava.EnumeratorToIterator(_list.GetEnumerator());
- }
-
- public bool isEmpty() {
- return _list.Count == 0;
- }
-
- public int size() {
- return _list.Count;
- }
-
- public bool contains(object value) {
- return value is T && _list.Contains((T) value);
- }
-
- public T get(int index) {
- if (index < 0 || index >= _list.Count) {
- throw new IndexOutOfBoundsException();
- } else {
- return _list[index];
- }
- }
-
- public void add(T value) {
- _list.Add(value);
- }
-
- public T remove(int index) {
- T value = _list[index];
- _list.RemoveAt(index);
- return value;
- }
- }
-}