1 module java.util.AbstractMap;
2 
3 import java.lang.all;
4 import java.util.Map;
5 import java.util.Collection;
6 import java.util.Set;
7 
8 abstract class AbstractMap : Map {
9     public this(){
10         implMissing( __FILE__, __LINE__ );
11     }
12     void   clear(){
13         implMissing( __FILE__, __LINE__ );
14     }
15     protected  Object       clone(){
16         implMissing( __FILE__, __LINE__ );
17         return null;
18     }
19     bool        containsKey(String key){
20         return containsKey(stringcast(key));
21     }
22     bool        containsKey(Object key){
23         implMissing( __FILE__, __LINE__ );
24         return false;
25     }
26     bool        containsValue(Object value){
27         implMissing( __FILE__, __LINE__ );
28         return false;
29     }
30     abstract  Set   entrySet();
31 
32     public override equals_t       opEquals(Object o){
33         if( Map other = cast(Map)o){
34             return cast(equals_t)entrySet().opEquals( cast(Object) other.entrySet() );
35         }
36         return false;
37     }
38 
39     Object         get(String key){
40         return get(stringcast(key));
41     }
42     Object         get(Object key){
43         implMissing( __FILE__, __LINE__ );
44         return null;
45     }
46     public override hash_t    toHash(){
47         implMissingSafe( __FILE__, __LINE__ );
48         return 0;
49     }
50     bool        isEmpty(){
51         implMissing( __FILE__, __LINE__ );
52         return false;
53     }
54     Set    keySet(){
55         implMissing( __FILE__, __LINE__ );
56         return null;
57     }
58     Object         put(String key, String value){
59         return put(stringcast(key),stringcast(value));
60     }
61     Object         put(Object key, String value){
62         return put(key,stringcast(value));
63     }
64     Object         put(String key, Object value){
65         return put(stringcast(key),value);
66     }
67     Object         put(Object key, Object value){
68         implMissing( __FILE__, __LINE__ );
69         return null;
70     }
71     void   putAll(Map t){
72         implMissing( __FILE__, __LINE__ );
73     }
74     Object         remove(String key){
75         return remove(stringcast(key));
76     }
77     Object         remove(Object key){
78         implMissing( __FILE__, __LINE__ );
79         return null;
80     }
81     int    size(){
82         implMissing( __FILE__, __LINE__ );
83         return 0;
84     }
85     override
86     String         toString(){
87         implMissing( __FILE__, __LINE__ );
88         return null;
89     }
90     Collection     values(){
91         implMissing( __FILE__, __LINE__ );
92         return null;
93     }
94     public int opApply (int delegate(ref Object value) dg){
95         foreach( entry; entrySet() ){
96             auto me = cast(Map.Entry)entry;
97             auto v = me.getValue();
98             int res = dg( v );
99             if( res ) return res;
100         }
101         return 0;
102     }
103     public int opApply (int delegate(ref Object key, ref Object value) dg){
104         foreach( entry; entrySet() ){
105             auto me = cast(Map.Entry)entry;
106             auto k = me.getKey();
107             auto v = me.getValue();
108             int res = dg( k, v );
109             if( res ) return res;
110         }
111         return 0;
112     } 
113  }
114