Mercurial > projects > dwt-addons
annotate dwtx/dwtxhelper/Collection.d @ 119:35f1d208f3c3
Collection impl
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 08 Aug 2008 19:28:39 +0200 |
parents | 1c497c6c0ad8 |
children | c0304616ea23 |
rev | line source |
---|---|
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1 module dwtx.dwtxhelper.Collection; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
2 |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
3 import dwt.dwthelper.utils; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
4 |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
5 static import tango.core.Exception; |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
6 static import tango.util.container.CircularList; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
7 static import tango.util.container.HashMap; |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
8 static import tango.util.container.HashSet; |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
9 static import tango.util.container.SortedMap; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
10 static import tango.util.container.more.Vector; |
119 | 11 static import tango.core.Array; |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
12 |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
13 // class AListIterator { |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
14 // |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
15 // ArraySeq!(Object) c; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
16 // int i; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
17 // |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
18 // this( ArraySeq!(Object) c ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
19 // this.c = c; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
20 // } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
21 // |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
22 // Object next(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
23 // return c.get(++i); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
24 // } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
25 // Object previous(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
26 // return c.get(--i); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
27 // } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
28 // |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
29 // bool hasNext(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
30 // return i+1 < c.size(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
31 // } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
32 // bool hasPrevious(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
33 // return i > 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
34 // } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
35 // |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
36 // void remove(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
37 // c.removeAt(i); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
38 // if( i is c.size() ) i--; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
39 // } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
40 // int nextIndex(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
41 // return i+1; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
42 // } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
43 // } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
44 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
45 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
46 interface Iterator { |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
47 public bool hasNext(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
48 public Object next(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
49 public void remove(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
50 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
51 |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
52 interface Enumeration { |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
53 public bool hasMoreElements(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
54 public Object nextElement(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
55 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
56 |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
57 interface Collection { |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
58 public bool add(Object o); |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
59 public bool add(String o); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
60 public bool addAll(Collection c); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
61 public void clear(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
62 public bool contains(Object o); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
63 public bool containsAll(Collection c); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
64 public int opEquals(Object o); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
65 public hash_t toHash(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
66 public bool isEmpty(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
67 public Iterator iterator(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
68 public bool remove(Object o); |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
69 public bool remove(String o); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
70 public bool removeAll(Collection c); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
71 public bool retainAll(Collection c); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
72 public int size(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
73 public Object[] toArray(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
74 public Object[] toArray(Object[] a); |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
75 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
76 // only for D |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
77 public int opApply (int delegate(ref Object value) dg); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
78 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
79 |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
80 interface Map { |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
81 interface Entry { |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
82 int opEquals(Object o); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
83 Object getKey(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
84 Object getValue(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
85 hash_t toHash(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
86 Object setValue(Object value); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
87 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
88 public void clear(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
89 public bool containsKey(Object key); |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
90 public bool containsKey(String key); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
91 public bool containsValue(Object value); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
92 public Set entrySet(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
93 public int opEquals(Object o); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
94 public Object get(Object key); |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
95 public Object get(String key); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
96 public hash_t toHash(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
97 public bool isEmpty(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
98 public Set keySet(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
99 public Object put(Object key, Object value); |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
100 public Object put(String key, Object value); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
101 public Object put(Object key, String value); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
102 public Object put(String key, String value); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
103 public void putAll(Map t); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
104 public Object remove(Object key); |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
105 public Object remove(String key); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
106 public int size(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
107 public Collection values(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
108 |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
109 // only for D |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
110 public int opApply (int delegate(ref Object value) dg); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
111 public int opApply (int delegate(ref Object key, ref Object value) dg); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
112 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
113 |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
114 interface List : Collection { |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
115 public void add(int index, Object element); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
116 public bool add(Object o); |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
117 public bool add(String o); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
118 public bool addAll(Collection c); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
119 public bool addAll(int index, Collection c); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
120 public void clear(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
121 public bool contains(Object o); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
122 public bool containsAll(Collection c); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
123 public int opEquals(Object o); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
124 public Object get(int index); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
125 public hash_t toHash(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
126 public int indexOf(Object o); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
127 public bool isEmpty(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
128 public Iterator iterator(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
129 public int lastIndexOf(Object o); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
130 public ListIterator listIterator(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
131 public ListIterator listIterator(int index); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
132 public Object remove(int index); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
133 public bool remove(Object o); |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
134 public bool remove(String o); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
135 public bool removeAll(Collection c); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
136 public bool retainAll(Collection c); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
137 public Object set(int index, Object element); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
138 public int size(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
139 public List subList(int fromIndex, int toIndex); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
140 public Object[] toArray(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
141 public Object[] toArray(Object[] a); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
142 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
143 |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
144 interface Set : Collection { |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
145 public bool add(Object o); |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
146 public bool add(String o); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
147 public bool addAll(Collection c); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
148 public void clear(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
149 public bool contains(Object o); |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
150 public bool contains(String o); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
151 public bool containsAll(Collection c); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
152 public int opEquals(Object o); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
153 public hash_t toHash(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
154 public bool isEmpty(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
155 public Iterator iterator(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
156 public bool remove(Object o); |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
157 public bool remove(String o); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
158 public bool removeAll(Collection c); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
159 public bool retainAll(Collection c); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
160 public int size(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
161 public Object[] toArray(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
162 public Object[] toArray(Object[] a); |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
163 public String toString(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
164 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
165 // only for D |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
166 public int opApply (int delegate(ref Object value) dg); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
167 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
168 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
169 interface SortedSet : Set { |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
170 Comparator comparator(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
171 Object first(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
172 SortedSet headSet(Object toElement); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
173 Object last(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
174 SortedSet subSet(Object fromElement, Object toElement); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
175 SortedSet tailSet(Object fromElement); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
176 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
177 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
178 interface SortedMap : Map { |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
179 Comparator comparator(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
180 Object firstKey(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
181 SortedMap headMap(Object toKey); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
182 Object lastKey(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
183 SortedMap subMap(Object fromKey, Object toKey); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
184 SortedMap tailMap(Object fromKey); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
185 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
186 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
187 interface ListIterator : Iterator { |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
188 public void add(Object o); |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
189 public bool add(String o); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
190 public bool hasNext(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
191 public bool hasPrevious(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
192 public Object next(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
193 public int nextIndex(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
194 public Object previous(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
195 public int previousIndex(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
196 public void remove(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
197 public void set(Object o); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
198 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
199 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
200 /////////////////////////////////////////////////////////////////////////////////////////////////// |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
201 /////////////////////////////////////////////////////////////////////////////////////////////////// |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
202 class MapEntry : Map.Entry { |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
203 Map map; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
204 Object key; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
205 private this( Map map, Object key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
206 this.map = map; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
207 this.key = key; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
208 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
209 public override int opEquals(Object o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
210 if( auto other = cast(MapEntry)o){ |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
211 |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
212 if(( getKey() is null ? other.getKey() is null : getKey() == other.getKey() ) && |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
213 ( getValue() is null ? other.getValue() is null : getValue() == other.getValue() )){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
214 return true; |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
215 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
216 return false; |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
217 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
218 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
219 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
220 public Object getKey(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
221 return key; |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
222 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
223 public Object getValue(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
224 return map.get(key); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
225 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
226 public override hash_t toHash(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
227 return ( getKey() is null ? 0 : getKey().toHash() ) ^ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
228 ( getValue() is null ? 0 : getValue().toHash() ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
229 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
230 public Object setValue(Object value){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
231 return map.put( key, value ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
232 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
233 |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
234 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
235 |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
236 class HashMap : Map { |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
237 // The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls. |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
238 alias tango.util.container.HashMap.HashMap!(Object,Object) MapType; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
239 private MapType map; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
240 |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
241 public this(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
242 map = new MapType(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
243 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
244 public this(int initialCapacity){ |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
245 this(); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
246 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
247 public this(int initialCapacity, float loadFactor){ |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
248 map = new MapType(loadFactor); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
249 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
250 public this(Map m){ |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
251 this(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
252 putAll(m); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
253 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
254 public void clear(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
255 map.clear(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
256 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
257 public bool containsKey(Object key){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
258 Object v; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
259 return map.get(key, v ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
260 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
261 public bool containsKey(String key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
262 return containsKey(stringcast(key)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
263 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
264 public bool containsValue(Object value){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
265 return map.contains(value); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
266 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
267 public Set entrySet(){ |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
268 HashSet res = new HashSet(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
269 foreach( k, v; map ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
270 res.add( new MapEntry(this,k)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
271 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
272 return res; |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
273 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
274 public override int opEquals(Object o){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
275 if( auto other = cast(HashMap) o ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
276 if( other.size() !is size() ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
277 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
278 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
279 foreach( k, v; map ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
280 Object vo = other.get(k); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
281 if( v != vo ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
282 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
283 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
284 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
285 return true; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
286 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
287 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
288 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
289 public Object get(Object key){ |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
290 if( auto v = key in map ){ |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
291 return *v; |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
292 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
293 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
294 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
295 public Object get(String key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
296 return get(stringcast(key)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
297 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
298 public override hash_t toHash(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
299 return super.toHash(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
300 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
301 public bool isEmpty(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
302 return map.isEmpty(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
303 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
304 public Set keySet(){ |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
305 HashSet res = new HashSet(); |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
306 foreach( k, v; map ){ |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
307 res.add(k); |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
308 } |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
309 return res; |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
310 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
311 public Object put(Object key, Object value){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
312 Object res = null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
313 if( auto vold = key in map ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
314 res = *vold; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
315 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
316 map[ key ] = value; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
317 return res; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
318 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
319 public Object put(String key, Object value){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
320 return put( stringcast(key), value ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
321 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
322 public Object put(Object key, String value){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
323 return put( key, stringcast(value) ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
324 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
325 public Object put(String key, String value){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
326 return put( stringcast(key), stringcast(value) ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
327 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
328 public void putAll(Map t){ |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
329 foreach( k, v; t ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
330 map[k] = v; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
331 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
332 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
333 public Object remove(Object key){ |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
334 if( auto v = key in map ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
335 Object res = *v; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
336 map.remove(key); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
337 return res; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
338 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
339 map.remove(key); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
340 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
341 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
342 public Object remove(String key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
343 return remove(stringcast(key)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
344 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
345 public int size(){ |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
346 return map.size(); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
347 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
348 public Collection values(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
349 ArrayList res = new ArrayList( size() ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
350 foreach( k, v; map ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
351 res.add( v ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
352 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
353 return res; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
354 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
355 |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
356 public int opApply (int delegate(ref Object value) dg){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
357 return map.opApply( dg ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
358 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
359 public int opApply (int delegate(ref Object key, ref Object value) dg){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
360 return map.opApply( dg ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
361 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
362 |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
363 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
364 |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
365 class Dictionary { |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
366 public this(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
367 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
368 abstract Enumeration elements(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
369 abstract Object get(Object key); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
370 Object get(String key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
371 return get(stringcast(key)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
372 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
373 abstract bool isEmpty(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
374 abstract Enumeration keys(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
375 abstract Object put(Object key, Object value); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
376 public Object put(String key, Object value){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
377 return put(stringcast(key), value); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
378 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
379 public Object put(Object key, String value){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
380 return put(key, stringcast(value)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
381 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
382 public Object put(String key, String value){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
383 return put(stringcast(key), stringcast(value)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
384 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
385 abstract Object remove(Object key); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
386 public Object remove(String key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
387 return remove(stringcast(key)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
388 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
389 abstract int size(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
390 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
391 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
392 class Hashtable : Dictionary, Map { |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
393 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
394 public Object get(String key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
395 return super.get(key); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
396 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
397 public Object put(String key, Object value){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
398 return super.put(key, value); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
399 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
400 public Object put(Object key, String value){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
401 return super.put(key, value); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
402 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
403 public Object put(String key, String value){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
404 return super.put(key, value); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
405 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
406 public Object remove(String key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
407 return super.remove(key); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
408 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
409 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
410 // The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls. |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
411 public this(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
412 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
413 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
414 public this(int initialCapacity){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
415 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
416 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
417 public this(int initialCapacity, float loadFactor){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
418 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
419 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
420 public this(Map t){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
421 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
422 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
423 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
424 Enumeration elements(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
425 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
426 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
427 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
428 Enumeration keys() { |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
429 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
430 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
431 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
432 public void clear(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
433 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
434 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
435 public bool containsKey(Object key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
436 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
437 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
438 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
439 public bool containsKey(String key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
440 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
441 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
442 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
443 public bool containsValue(Object value){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
444 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
445 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
446 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
447 public Set entrySet(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
448 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
449 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
450 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
451 public int opEquals(Object o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
452 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
453 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
454 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
455 public Object get(Object key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
456 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
457 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
458 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
459 public hash_t toHash(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
460 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
461 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
462 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
463 public bool isEmpty(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
464 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
465 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
466 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
467 public Set keySet(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
468 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
469 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
470 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
471 public Object put(Object key, Object value){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
472 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
473 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
474 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
475 // public Object put(String key, Object value) |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
476 // public Object put(Object key, String value) |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
477 // public Object put(String key, String value) |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
478 public void putAll(Map t){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
479 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
480 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
481 public Object remove(Object key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
482 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
483 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
484 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
485 // public Object remove(String key) |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
486 public int size(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
487 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
488 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
489 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
490 public Collection values(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
491 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
492 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
493 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
494 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
495 // only for D |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
496 public int opApply (int delegate(ref Object value) dg){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
497 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
498 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
499 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
500 public int opApply (int delegate(ref Object key, ref Object value) dg){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
501 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
502 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
503 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
504 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
505 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
506 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
507 abstract class AbstractMap : Map { |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
508 public this(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
509 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
510 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
511 void clear(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
512 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
513 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
514 protected Object clone(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
515 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
516 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
517 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
518 bool containsKey(Object key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
519 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
520 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
521 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
522 bool containsValue(Object value){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
523 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
524 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
525 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
526 abstract Set entrySet(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
527 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
528 public override int opEquals(Object o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
529 if( Map other = cast(Map)o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
530 return entrySet().opEquals( cast(Object) other.entrySet() ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
531 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
532 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
533 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
534 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
535 Object get(Object key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
536 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
537 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
538 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
539 public override hash_t toHash(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
540 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
541 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
542 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
543 bool isEmpty(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
544 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
545 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
546 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
547 Set keySet(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
548 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
549 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
550 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
551 Object put(Object key, Object value){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
552 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
553 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
554 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
555 void putAll(Map t){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
556 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
557 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
558 Object remove(Object key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
559 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
560 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
561 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
562 int size(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
563 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
564 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
565 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
566 String toString(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
567 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
568 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
569 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
570 Collection values(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
571 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
572 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
573 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
574 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
575 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
576 class TreeMap : Map, SortedMap { |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
577 alias tango.util.container.SortedMap.SortedMap!(Object,Object) MapType; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
578 private MapType map; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
579 |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
580 public this(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
581 map = new MapType(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
582 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
583 public this(Comparator c){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
584 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
585 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
586 public this(Map m){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
587 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
588 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
589 public this(SortedMap m){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
590 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
591 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
592 public void clear(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
593 map.clear(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
594 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
595 Comparator comparator(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
596 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
597 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
598 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
599 public bool containsKey(Object key){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
600 Object v; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
601 return map.get(key, v ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
602 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
603 public bool containsKey(String key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
604 return containsKey(stringcast(key)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
605 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
606 public bool containsValue(Object value){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
607 return map.contains(value); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
608 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
609 public Set entrySet(){ |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
610 TreeSet res = new TreeSet(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
611 foreach( k, v; map ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
612 res.add( new MapEntry(this,k) ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
613 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
614 return res; |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
615 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
616 public override int opEquals(Object o){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
617 if( auto other = cast(HashMap) o ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
618 if( other.size() !is size() ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
619 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
620 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
621 foreach( k, v; map ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
622 Object vo = other.get(k); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
623 if( v != vo ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
624 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
625 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
626 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
627 return true; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
628 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
629 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
630 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
631 Object firstKey(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
632 foreach( k; map ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
633 return k; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
634 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
635 throw new tango.core.Exception.NoSuchElementException( "TreeMap.firstKey" ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
636 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
637 public Object get(Object key){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
638 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
639 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
640 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
641 public Object get(String key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
642 return get(stringcast(key)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
643 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
644 public override hash_t toHash(){ |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
645 // http://java.sun.com/j2se/1.4.2/docs/api/java/util/AbstractMap.html#hashCode() |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
646 hash_t res = 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
647 foreach( e; entrySet() ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
648 res += e.toHash(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
649 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
650 return res; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
651 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
652 SortedMap headMap(Object toKey){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
653 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
654 return null; |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
655 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
656 public bool isEmpty(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
657 return map.isEmpty(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
658 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
659 public Set keySet(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
660 TreeSet res = new TreeSet(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
661 foreach( k; map ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
662 res.add( k ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
663 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
664 return res; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
665 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
666 Object lastKey(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
667 Object res; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
668 foreach( k; map ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
669 res = k; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
670 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
671 if( map.size() ) return res; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
672 throw new tango.core.Exception.NoSuchElementException( "TreeMap.lastKey" ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
673 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
674 public Object put(Object key, Object value){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
675 if( map.contains(key) ){ // TODO if tango has opIn_r, then use the "in" operator |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
676 Object res = map[key]; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
677 map[key] = value; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
678 return res; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
679 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
680 map[key] = value; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
681 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
682 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
683 public Object put(String key, Object value){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
684 return put(stringcast(key), value); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
685 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
686 public Object put(Object key, String value){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
687 return put(key, stringcast(value)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
688 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
689 public Object put(String key, String value){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
690 return put(stringcast(key), stringcast(value)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
691 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
692 public void putAll(Map t){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
693 foreach( k, v; t ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
694 put( k, v ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
695 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
696 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
697 public Object remove(Object key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
698 Object res; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
699 map.take(key,res); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
700 return res; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
701 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
702 public Object remove(String key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
703 return remove(stringcast(key)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
704 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
705 public int size(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
706 return map.size(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
707 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
708 SortedMap subMap(Object fromKey, Object toKey){ |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
709 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
710 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
711 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
712 SortedMap tailMap(Object fromKey){ |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
713 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
714 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
715 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
716 public Collection values(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
717 ArrayList res = new ArrayList( size() ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
718 foreach( k, v; map ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
719 res.add( v ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
720 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
721 return res; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
722 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
723 |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
724 public int opApply (int delegate(ref Object value) dg){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
725 return map.opApply( dg ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
726 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
727 public int opApply (int delegate(ref Object key, ref Object value) dg){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
728 return map.opApply( dg ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
729 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
730 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
731 |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
732 class HashSet : Set { |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
733 alias tango.util.container.HashSet.HashSet!(Object) SetType; |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
734 private SetType set; |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
735 |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
736 public this(){ |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
737 set = new SetType(); |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
738 } |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
739 public this(Collection c){ |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
740 implMissing( __FILE__, __LINE__ ); |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
741 } |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
742 public this(int initialCapacity){ |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
743 implMissing( __FILE__, __LINE__ ); |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
744 } |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
745 public this(int initialCapacity, float loadFactor){ |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
746 implMissing( __FILE__, __LINE__ ); |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
747 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
748 public bool add(Object o){ |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
749 return set.add(o); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
750 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
751 public bool add(String o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
752 return add(stringcast(o)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
753 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
754 public bool addAll(Collection c){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
755 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
756 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
757 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
758 public void clear(){ |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
759 set.clear(); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
760 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
761 public bool contains(Object o){ |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
762 return set.contains(o); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
763 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
764 public bool contains(String o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
765 return contains(stringcast(o)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
766 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
767 public bool containsAll(Collection c){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
768 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
769 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
770 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
771 public override int opEquals(Object o){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
772 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
773 return 0; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
774 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
775 public override hash_t toHash(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
776 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
777 return 0; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
778 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
779 public bool isEmpty(){ |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
780 return set.isEmpty(); |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
781 } |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
782 class LocalIterator : Iterator { |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
783 SetType.Iterator iter; |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
784 Object nextElem; |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
785 this( SetType.Iterator iter){ |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
786 this.iter = iter; |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
787 } |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
788 public bool hasNext(){ |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
789 return iter.next(nextElem); |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
790 } |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
791 public Object next(){ |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
792 return nextElem; |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
793 } |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
794 public void remove(){ |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
795 iter.remove(); |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
796 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
797 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
798 public Iterator iterator(){ |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
799 return new LocalIterator(set.iterator()); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
800 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
801 public bool remove(Object o){ |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
802 return set.remove(o); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
803 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
804 public bool remove(String key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
805 return remove(stringcast(key)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
806 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
807 public bool removeAll(Collection c){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
808 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
809 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
810 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
811 public bool retainAll(Collection c){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
812 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
813 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
814 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
815 public int size(){ |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
816 return set.size(); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
817 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
818 public Object[] toArray(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
819 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
820 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
821 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
822 public Object[] toArray(Object[] a){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
823 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
824 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
825 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
826 public override String toString(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
827 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
828 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
829 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
830 |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
831 // only for D |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
832 public int opApply (int delegate(ref Object value) dg){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
833 return set.opApply(dg); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
834 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
835 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
836 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
837 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
838 abstract class AbstractCollection : Collection { |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
839 this(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
840 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
841 bool add(Object o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
842 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
843 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
844 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
845 bool addAll(Collection c){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
846 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
847 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
848 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
849 void clear(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
850 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
851 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
852 bool contains(Object o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
853 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
854 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
855 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
856 bool containsAll(Collection c){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
857 if( c is null ) throw new NullPointerException(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
858 foreach( o; c ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
859 if( !contains(o) ) return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
860 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
861 return true; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
862 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
863 override int opEquals(Object o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
864 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
865 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
866 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
867 bool isEmpty(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
868 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
869 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
870 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
871 abstract Iterator iterator(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
872 override hash_t toHash(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
873 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
874 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
875 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
876 bool remove(Object o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
877 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
878 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
879 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
880 bool remove(String o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
881 return remove(stringcast(o)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
882 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
883 bool removeAll(Collection c){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
884 if( c is null ) throw new NullPointerException(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
885 bool res = false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
886 foreach( o; c ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
887 res |= remove(o); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
888 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
889 return res; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
890 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
891 bool retainAll(Collection c){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
892 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
893 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
894 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
895 abstract int size(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
896 Object[] toArray(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
897 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
898 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
899 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
900 Object[] toArray(Object[] a){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
901 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
902 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
903 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
904 String toString(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
905 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
906 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
907 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
908 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
909 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
910 abstract class AbstractSet : AbstractCollection, Set { |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
911 this(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
912 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
913 int opEquals(Object o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
914 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
915 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
916 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
917 hash_t toHash(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
918 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
919 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
920 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
921 bool removeAll(Collection c){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
922 return super.removeAll(c); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
923 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
924 public abstract bool add(Object o); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
925 public abstract bool add(String o); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
926 public abstract bool addAll(Collection c); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
927 public abstract void clear(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
928 public abstract bool contains(Object o); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
929 public abstract bool contains(String o); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
930 public abstract bool containsAll(Collection c); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
931 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
932 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
933 public abstract bool isEmpty(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
934 public abstract Iterator iterator(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
935 public abstract bool remove(Object o); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
936 public abstract bool remove(String o); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
937 public abstract bool removeAll(Collection c); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
938 public abstract bool retainAll(Collection c); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
939 public abstract int size(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
940 public abstract Object[] toArray(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
941 public abstract Object[] toArray(Object[] a); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
942 public abstract String toString(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
943 return super.toString(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
944 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
945 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
946 // only for D |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
947 public abstract int opApply (int delegate(ref Object value) dg); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
948 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
949 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
950 abstract class AbstractList : AbstractCollection, List { |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
951 this(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
952 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
953 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
954 public abstract void add(int index, Object element); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
955 public abstract bool add(Object o); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
956 public abstract bool addAll(Collection c); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
957 public abstract bool addAll(int index, Collection c); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
958 public abstract void clear(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
959 public abstract bool contains(Object o); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
960 public abstract bool containsAll(Collection c); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
961 public abstract int opEquals(Object o); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
962 public abstract Object get(int index); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
963 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
964 public hash_t toHash(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
965 // http://java.sun.com/j2se/1.4.2/docs/api/java/util/List.html#hashCode() |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
966 hash_t hashCode = 1; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
967 Iterator i = iterator(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
968 while (i.hasNext()) { |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
969 Object obj = i.next(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
970 hashCode = 31 * hashCode + (obj is null ? 0 : obj.toHash()); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
971 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
972 return hashCode; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
973 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
974 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
975 public abstract int indexOf(Object o); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
976 public abstract bool isEmpty(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
977 public abstract Iterator iterator(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
978 public abstract int lastIndexOf(Object o); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
979 public abstract ListIterator listIterator(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
980 public abstract ListIterator listIterator(int index); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
981 public abstract Object remove(int index); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
982 protected abstract void removeRange(int fromIndex, int toIndex); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
983 public abstract bool remove(Object o); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
984 public abstract bool remove(String o); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
985 public abstract bool removeAll(Collection c); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
986 public abstract bool retainAll(Collection c); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
987 public abstract Object set(int index, Object element); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
988 public abstract List subList(int fromIndex, int toIndex); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
989 public abstract Object[] toArray(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
990 public abstract Object[] toArray(Object[] a); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
991 |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
992 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
993 |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
994 class TreeSet : AbstractSet, SortedSet { |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
995 |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
996 alias tango.util.container.SortedMap.SortedMap!(Object,int) SetType; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
997 private SetType set; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
998 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
999 public this(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1000 set = new SetType(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1001 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1002 public this(Collection c){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1003 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1004 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1005 public this(Comparator c){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1006 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1007 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1008 public this(SortedSet){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1009 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1010 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1011 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1012 public bool add(Object o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1013 return set.add(o, 0); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1014 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1015 public bool add(String o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1016 return add(stringcast(o)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1017 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1018 public bool addAll(Collection c){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1019 foreach( o; c ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1020 add(o); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1021 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1022 return true; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1023 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1024 public void clear(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1025 set.clear(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1026 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1027 public bool contains(Object o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1028 return set.containsKey(o); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1029 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1030 public bool contains(String o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1031 return contains(stringcast(o)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1032 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1033 public bool containsAll(Collection c){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1034 foreach( o; c ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1035 if( !contains(o) ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1036 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1037 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1038 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1039 return true; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1040 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1041 public Comparator comparator(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1042 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1043 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1044 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1045 public override int opEquals(Object o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1046 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1047 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1048 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1049 public Object first(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1050 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1051 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1052 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1053 public override hash_t toHash(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1054 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1055 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1056 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1057 public SortedSet headSet(Object toElement){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1058 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1059 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1060 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1061 public bool isEmpty(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1062 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1063 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1064 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1065 public Iterator iterator(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1066 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1067 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1068 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1069 public Object last(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1070 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1071 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1072 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1073 public bool remove(Object o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1074 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1075 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1076 public bool remove(String key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1077 return remove(stringcast(key)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1078 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1079 public bool removeAll(Collection c){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1080 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1081 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1082 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1083 public bool retainAll(Collection c){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1084 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1085 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1086 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1087 public int size(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1088 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1089 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1090 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1091 public SortedSet subSet(Object fromElement, Object toElement){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1092 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1093 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1094 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1095 public SortedSet tailSet(Object fromElement){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1096 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1097 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1098 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1099 public Object[] toArray(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1100 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1101 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1102 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1103 public Object[] toArray(Object[] a){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1104 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1105 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1106 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1107 public override String toString(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1108 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1109 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1110 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1111 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1112 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1113 // only for D |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1114 public int opApply (int delegate(ref Object value) dg){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1115 int localDg( ref Object key, ref int value ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1116 return dg( key ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1117 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1118 return set.opApply(&localDg); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1119 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1120 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1121 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1122 class Vector : AbstractList, List { |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1123 public this(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1124 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1125 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1126 public this(Collection c){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1127 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1128 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1129 public this(int initialCapacity){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1130 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1131 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1132 public this(int initialCapacity, int capacityIncrement){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1133 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1134 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1135 public void add(int index, Object element){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1136 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1137 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1138 public bool add(Object o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1139 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1140 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1141 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1142 public bool add(String o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1143 return add(stringcast(o)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1144 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1145 public bool addAll(Collection c){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1146 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1147 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1148 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1149 public bool addAll(int index, Collection c){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1150 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1151 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1152 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1153 public void addElement(Object obj){ |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1154 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1155 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1156 public int capacity(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1157 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1158 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1159 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1160 public void clear(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1161 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1162 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1163 public Object clone(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1164 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1165 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1166 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1167 public bool contains(Object elem){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1168 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1169 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1170 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1171 public bool containsAll(Collection c){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1172 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1173 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1174 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1175 public void copyInto(Object[] anArray){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1176 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1177 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1178 public Object elementAt(int index){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1179 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1180 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1181 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1182 public Enumeration elements(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1183 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1184 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1185 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1186 public void ensureCapacity(int minCapacity){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1187 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1188 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1189 public int opEquals(Object o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1190 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1191 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1192 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1193 public Object firstElement(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1194 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1195 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1196 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1197 public Object get(int index){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1198 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1199 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1200 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1201 public hash_t toHash(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1202 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1203 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1204 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1205 public int indexOf(Object elem){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1206 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1207 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1208 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1209 public int indexOf(Object elem, int index){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1210 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1211 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1212 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1213 public void insertElementAt(Object obj, int index){ |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1214 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1215 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1216 public bool isEmpty(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1217 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1218 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1219 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1220 public Iterator iterator(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1221 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1222 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1223 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1224 public Object lastElement(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1225 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1226 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1227 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1228 public int lastIndexOf(Object elem){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1229 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1230 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1231 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1232 public int lastIndexOf(Object elem, int index){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1233 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1234 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1235 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1236 public ListIterator listIterator(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1237 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1238 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1239 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1240 public ListIterator listIterator(int index){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1241 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1242 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1243 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1244 public Object remove(int index){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1245 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1246 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1247 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1248 public bool remove(Object o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1249 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1250 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1251 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1252 public bool remove(String key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1253 return remove(stringcast(key)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1254 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1255 public bool removeAll(Collection c){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1256 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1257 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1258 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1259 public void removeAllElements(){ |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1260 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1261 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1262 public bool removeElement(Object obj){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1263 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1264 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1265 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1266 public void removeElementAt(int index){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1267 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1268 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1269 protected void removeRange(int fromIndex, int toIndex){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1270 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1271 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1272 public bool retainAll(Collection c){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1273 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1274 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1275 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1276 public Object set(int index, Object element){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1277 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1278 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1279 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1280 public void setElementAt(Object obj, int index){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1281 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1282 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1283 public void setSize(int newSize){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1284 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1285 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1286 public int size(){ |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1287 implMissing( __FILE__, __LINE__ ); |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1288 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1289 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1290 public List subList(int fromIndex, int toIndex){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1291 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1292 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1293 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1294 public Object[] toArray(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1295 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1296 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1297 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1298 public Object[] toArray(Object[] a){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1299 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1300 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1301 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1302 public String toString(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1303 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1304 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1305 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1306 public void trimToSize(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1307 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1308 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1309 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1310 // only for D |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1311 public int opApply (int delegate(ref Object value) dg){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1312 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1313 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1314 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1315 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1316 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1317 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1318 class Stack : Vector { |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1319 this(){ |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1320 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1321 void add(int index, Object element){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1322 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1323 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1324 bool add(Object o){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1325 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1326 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1327 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1328 public bool add(String o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1329 return add(stringcast(o)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1330 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1331 bool addAll(Collection c){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1332 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1333 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1334 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1335 bool addAll(int index, Collection c){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1336 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1337 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1338 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1339 void addElement(Object obj){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1340 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1341 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1342 int capacity(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1343 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1344 return 0; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1345 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1346 void clear(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1347 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1348 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1349 Object clone(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1350 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1351 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1352 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1353 bool contains(Object elem){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1354 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1355 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1356 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1357 bool containsAll(Collection c){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1358 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1359 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1360 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1361 void copyInto(Object[] anArray){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1362 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1363 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1364 Object elementAt(int index){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1365 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1366 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1367 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1368 // Enumeration elements(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1369 // implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1370 // return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1371 // } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1372 void ensureCapacity(int minCapacity){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1373 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1374 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1375 int opEquals(Object o){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1376 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1377 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1378 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1379 Object firstElement(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1380 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1381 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1382 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1383 Object get(int index){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1384 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1385 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1386 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1387 hash_t toHash(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1388 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1389 return 0; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1390 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1391 int indexOf(Object elem){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1392 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1393 return 0; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1394 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1395 int indexOf(Object elem, int index){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1396 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1397 return 0; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1398 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1399 void insertElementAt(Object obj, int index){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1400 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1401 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1402 bool isEmpty(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1403 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1404 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1405 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1406 Iterator iterator(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1407 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1408 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1409 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1410 Object lastElement(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1411 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1412 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1413 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1414 int lastIndexOf(Object elem){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1415 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1416 return 0; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1417 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1418 int lastIndexOf(Object elem, int index){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1419 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1420 return 0; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1421 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1422 ListIterator listIterator(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1423 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1424 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1425 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1426 ListIterator listIterator(int index){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1427 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1428 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1429 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1430 Object remove(int index){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1431 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1432 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1433 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1434 bool remove(Object o){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1435 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1436 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1437 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1438 public bool remove(String key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1439 return remove(stringcast(key)); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1440 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1441 bool removeAll(Collection c){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1442 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1443 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1444 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1445 void removeAllElements(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1446 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1447 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1448 bool removeElement(Object obj){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1449 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1450 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1451 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1452 void removeElementAt(int index){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1453 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1454 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1455 protected void removeRange(int fromIndex, int toIndex){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1456 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1457 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1458 bool retainAll(Collection c){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1459 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1460 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1461 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1462 Object set(int index, Object element){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1463 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1464 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1465 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1466 void setElementAt(Object obj, int index){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1467 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1468 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1469 void setSize(int newSize){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1470 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1471 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1472 int size(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1473 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1474 return 0; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1475 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1476 List subList(int fromIndex, int toIndex){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1477 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1478 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1479 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1480 Object[] toArray(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1481 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1482 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1483 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1484 Object[] toArray(Object[] a){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1485 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1486 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1487 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1488 |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1489 // from Stack |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1490 String toString(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1491 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1492 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1493 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1494 void trimToSize(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1495 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1496 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1497 bool empty(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1498 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1499 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1500 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1501 Object peek(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1502 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1503 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1504 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1505 Object pop(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1506 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1507 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1508 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1509 Object push(Object item){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1510 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1511 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1512 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1513 int search(Object o){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1514 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1515 return 0; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1516 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1517 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1518 // only for D |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1519 public int opApply (int delegate(ref Object value) dg){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1520 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1521 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1522 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1523 |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1524 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1525 |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1526 class LinkedList : List { |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1527 alias tango.util.container.CircularList.CircularList!(Object) ListType; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1528 private ListType list; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1529 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1530 this(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1531 list = new ListType(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1532 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1533 this( Collection c ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1534 this(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1535 addAll(c); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1536 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1537 void add(int index, Object element){ |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1538 list.addAt(index,element); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1539 return true; |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1540 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1541 bool add(Object o){ |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1542 list.add(o); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1543 return true; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1544 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1545 public bool add(String o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1546 return add(stringcast(o)); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1547 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1548 bool addAll(Collection c){ |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1549 if( c is null ) throw new NullPointerException(); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1550 bool res = false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1551 foreach( o; c ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1552 res |= add( o ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1553 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1554 return res; |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1555 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1556 bool addAll(int index, Collection c){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1557 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1558 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1559 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1560 void addFirst(Object o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1561 list.prepend( o ); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1562 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1563 void addLast(Object o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1564 list.append( o ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1565 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1566 // void addElement(Object obj){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1567 // implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1568 // } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1569 int capacity(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1570 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1571 return 0; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1572 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1573 void clear(){ |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1574 list.clear(); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1575 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1576 Object clone(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1577 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1578 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1579 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1580 bool contains(Object elem){ |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1581 return list.contains(elem); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1582 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1583 bool containsAll(Collection c){ |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1584 foreach(o; c){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1585 if( !list.contains(o)) return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1586 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1587 return true; |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1588 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1589 void copyInto(Object[] anArray){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1590 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1591 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1592 Object elementAt(int index){ |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1593 return list.get(index); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1594 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1595 // Enumeration elements(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1596 // implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1597 // return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1598 // } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1599 void ensureCapacity(int minCapacity){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1600 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1601 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1602 int opEquals(Object o){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1603 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1604 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1605 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1606 Object firstElement(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1607 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1608 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1609 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1610 Object get(int index){ |
116 | 1611 return list.get(index); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1612 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1613 hash_t toHash(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1614 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1615 return 0; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1616 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1617 int indexOf(Object elem){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1618 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1619 return 0; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1620 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1621 int indexOf(Object elem, int index){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1622 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1623 return 0; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1624 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1625 void insertElementAt(Object obj, int index){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1626 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1627 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1628 bool isEmpty(){ |
116 | 1629 return list.isEmpty(); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1630 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1631 Iterator iterator(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1632 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1633 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1634 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1635 Object lastElement(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1636 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1637 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1638 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1639 int lastIndexOf(Object elem){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1640 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1641 return 0; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1642 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1643 int lastIndexOf(Object elem, int index){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1644 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1645 return 0; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1646 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1647 ListIterator listIterator(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1648 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1649 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1650 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1651 ListIterator listIterator(int index){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1652 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1653 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1654 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1655 Object remove(int index){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1656 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1657 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1658 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1659 bool remove(Object o){ |
116 | 1660 return list.remove(o,false) !is 0; |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1661 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1662 public bool remove(String key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1663 return remove(stringcast(key)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1664 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1665 bool removeAll(Collection c){ |
116 | 1666 bool res = false; |
1667 foreach( o; c){ | |
1668 res |= list.remove(o,false) !is 0; | |
1669 } | |
1670 return res; | |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1671 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1672 void removeAllElements(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1673 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1674 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1675 Object removeFirst(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1676 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1677 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1678 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1679 Object removeLast(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1680 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1681 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1682 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1683 bool removeElement(Object obj){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1684 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1685 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1686 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1687 void removeElementAt(int index){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1688 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1689 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1690 protected void removeRange(int fromIndex, int toIndex){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1691 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1692 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1693 bool retainAll(Collection c){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1694 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1695 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1696 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1697 Object set(int index, Object element){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1698 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1699 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1700 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1701 void setElementAt(Object obj, int index){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1702 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1703 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1704 void setSize(int newSize){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1705 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1706 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1707 int size(){ |
114 | 1708 return list.size(); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1709 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1710 List subList(int fromIndex, int toIndex){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1711 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1712 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1713 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1714 Object[] toArray(){ |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1715 return list.toArray(); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1716 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1717 Object[] toArray(Object[] a){ |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1718 return list.toArray( a ); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1719 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1720 String toString(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1721 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1722 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1723 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1724 void trimToSize(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1725 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1726 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1727 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1728 // only for D |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1729 public int opApply (int delegate(ref Object value) dg){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1730 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1731 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1732 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1733 |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1734 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1735 |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1736 class ArrayList : AbstractList, List { |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1737 private Object[] data; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1738 |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1739 this(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1740 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1741 this(int size){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1742 data.length = size; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1743 data.length = 0; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1744 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1745 this(Collection){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1746 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1747 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1748 void add(int index, Object element){ |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1749 data.length = data.length +1; |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1750 System.arraycopy( data, index, data, index+1, data.length - index -1 ); |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1751 data[index] = element; |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1752 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1753 bool add(Object o){ |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1754 data ~= o; |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1755 return true; |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1756 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1757 public bool add(String o){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1758 return add(stringcast(o)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1759 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1760 bool addAll(Collection c){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1761 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1762 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1763 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1764 bool addAll(int index, Collection c){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1765 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1766 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1767 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1768 void clear(){ |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1769 data.length = 0; |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1770 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1771 ArrayList clone(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1772 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1773 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1774 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1775 bool contains(Object o){ |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1776 foreach( v; data ){ |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1777 if( o is v ){ |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1778 return true; |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1779 } |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1780 if(( o is null ) || ( v is null )){ |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1781 continue; |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1782 } |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1783 if( o == v ){ |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1784 return true; |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1785 } |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1786 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1787 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1788 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1789 bool containsAll(Collection c){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1790 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1791 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1792 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1793 int opEquals(Object o){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1794 if( auto other = cast(ArrayList)o ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1795 if( data.length !is other.data.length ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1796 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1797 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1798 for( int i = 0; i < data.length; i++ ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1799 if( data[i] is other.data[i] ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1800 continue; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1801 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1802 if(( data[i] is null ) || ( other.data[i] is null )){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1803 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1804 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1805 if( data[i] == other.data[i] ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1806 continue; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1807 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1808 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1809 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1810 return true; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1811 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1812 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1813 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1814 Object get(int index){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1815 return data[index]; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1816 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1817 public override hash_t toHash(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1818 return super.toHash(); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1819 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1820 int indexOf(Object o){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1821 foreach( i, v; data ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1822 if( data[i] is o ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1823 return i; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1824 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1825 if(( data[i] is null ) || ( o is null )){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1826 continue; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1827 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1828 if( data[i] == o ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1829 return i; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1830 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1831 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1832 return -1; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1833 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1834 bool isEmpty(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1835 return data.length is 0; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1836 } |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1837 class LocalIterator : Iterator{ |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1838 int idx = 0; |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1839 public this(){ |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1840 } |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1841 public bool hasNext(){ |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1842 return idx < data.length; |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1843 } |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1844 public Object next(){ |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1845 Object res = data[idx]; |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1846 idx++; |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1847 return res; |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1848 } |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1849 public void remove(){ |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1850 implMissing( __FILE__, __LINE__ ); |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1851 this.outer.remove(idx); |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1852 idx--; |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1853 } |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1854 } |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1855 |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1856 Iterator iterator(){ |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1857 return new LocalIterator(); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1858 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1859 int lastIndexOf(Object o){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1860 foreach_reverse( i, v; data ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1861 if( data[i] is o ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1862 return i; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1863 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1864 if(( data[i] is null ) || ( o is null )){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1865 continue; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1866 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1867 if( data[i] == o ){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1868 return i; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1869 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1870 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1871 return -1; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1872 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1873 ListIterator listIterator(){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1874 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1875 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1876 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1877 ListIterator listIterator(int index){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1878 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1879 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1880 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1881 Object remove(int index){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1882 Object res = data[index]; |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1883 System.arraycopy( data, index+1, data, index, data.length - index - 1 ); |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1884 data.length = data.length -1; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1885 return res; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1886 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1887 bool remove(Object o){ |
119 | 1888 return tango.core.Array.remove(data, o) !is 0; |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1889 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1890 public bool remove(String key){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1891 return remove(stringcast(key)); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1892 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1893 bool removeAll(Collection c){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1894 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1895 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1896 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1897 bool retainAll(Collection c){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1898 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1899 return false; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1900 } |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1901 protected void removeRange(int fromIndex, int toIndex){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1902 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1903 } |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1904 Object set(int index, Object element){ |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1905 Object res = data[index]; |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1906 data[index] = element; |
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1907 return res; |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1908 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1909 int size(){ |
101
1082a0fc2bb8
First Draw2D example running
Frank Benoit <benoit@tionex.de>
parents:
100
diff
changeset
|
1910 return data.length; |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1911 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1912 List subList(int fromIndex, int toIndex){ |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1913 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1914 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1915 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1916 Object[] toArray(){ |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1917 return data.dup; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1918 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1919 Object[] toArray(Object[] a){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1920 if( data.length <= a.length ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1921 a[ 0 .. data.length ] = data; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1922 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1923 else{ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1924 return data.dup; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1925 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1926 if( data.length < a.length ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1927 a[data.length] = null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1928 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1929 return a; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1930 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1931 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1932 // only for D |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1933 public int opApply (int delegate(ref Object value) dg){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1934 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1935 return 0; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1936 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1937 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1938 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1939 class Arrays { |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1940 public static bool equals(Object[] a, Object[] b){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1941 if( a.length !is b.length ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1942 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1943 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1944 for( int i = 0; i < a.length; i++ ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1945 if( a[i] is null && b[i] is null ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1946 continue; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1947 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1948 if( a[i] !is null && b[i] !is null && a[i] == b[i] ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1949 continue; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1950 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1951 return false; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1952 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1953 return true; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1954 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1955 static List asList(Object[] a) { |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1956 if( a.length is 0 ) return Collections.EMPTY_LIST; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1957 ArrayList res = new ArrayList( a.length ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1958 foreach( o; a ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1959 res.add(o); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1960 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1961 return res; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1962 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1963 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1964 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1965 class Collections { |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1966 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1967 private static List EMPTY_LIST_; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1968 public static List EMPTY_LIST(){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1969 if( EMPTY_LIST_ is null ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1970 synchronized(Collections.classinfo ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1971 if( EMPTY_LIST_ is null ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1972 EMPTY_LIST_ = new ArrayList(0); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1973 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1974 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1975 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1976 return EMPTY_LIST_; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1977 } |
106 | 1978 private static Map EMPTY_MAP_; |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1979 public static Map EMPTY_MAP(){ |
106 | 1980 if( EMPTY_MAP_ is null ){ |
1981 synchronized(Collections.classinfo ){ | |
1982 if( EMPTY_MAP_ is null ){ | |
1983 EMPTY_MAP_ = new TreeMap(); | |
1984 } | |
1985 } | |
1986 } | |
1987 return EMPTY_MAP_; | |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1988 } |
106 | 1989 private static Set EMPTY_SET_; |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1990 public static Set EMPTY_SET(){ |
106 | 1991 if( EMPTY_SET_ is null ){ |
1992 synchronized(Collections.classinfo ){ | |
1993 if( EMPTY_SET_ is null ){ | |
1994 EMPTY_SET_ = new TreeSet(); | |
1995 } | |
1996 } | |
1997 } | |
1998 return EMPTY_SET_; | |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
1999 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2000 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2001 public static List unmodifiableList( List list ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2002 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2003 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2004 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2005 public static Map unmodifiableMap( Map list ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2006 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2007 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2008 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2009 public static Set unmodifiableSet( Set list ){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2010 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2011 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2012 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2013 public static Set singleton( Object o ){ |
106 | 2014 TreeSet res = new TreeSet(); |
2015 res.add(o); | |
2016 return res; | |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2017 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2018 public static void sort(List list){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2019 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2020 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2021 public static void sort(List list, Comparator c){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2022 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2023 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2024 |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2025 static Collection synchronizedCollection(Collection c){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2026 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2027 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2028 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2029 static List synchronizedList(List list){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2030 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2031 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2032 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2033 static Map synchronizedMap(Map m){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2034 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2035 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2036 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2037 static Set synchronizedSet(Set s){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2038 implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2039 return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2040 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2041 // static SortedMap synchronizedSortedMap(SortedMap m){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2042 // implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2043 // return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2044 // } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2045 // static SortedSet synchronizedSortedSet(SortedSet s){ |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2046 // implMissing( __FILE__, __LINE__ ); |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2047 // return null; |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2048 // } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2049 static void reverse(List list) { |
106 | 2050 Object[] data = list.toArray(); |
2051 for( int idx = 0; idx < data.length; idx++ ){ | |
2052 list.set( data.length -1 -idx, data[idx] ); | |
2053 } | |
104
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2054 } |
04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
Frank Benoit <benoit@tionex.de>
parents:
101
diff
changeset
|
2055 static Enumeration enumeration(Collection c){ |
100
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
2056 implMissing( __FILE__, __LINE__ ); |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
2057 return null; |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
2058 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
2059 } |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
2060 |
86617aa6b5dd
More helper classes, needed by draw2d
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
2061 |