Coccinelle release 0.2.5-rc3
[bpt/coccinelle.git] / commons / oassoc.mli
CommitLineData
34e49164
C
1
2class virtual ['a, 'b] oassoc :
3object ('o)
4 inherit ['a * 'b] Ocollection.ocollection
5
6 method virtual assoc : 'a -> 'b
7 method virtual delkey : 'a -> 'o
8
113803cf 9 (* may raise NotFound *)
34e49164 10 method find : 'a -> 'b
113803cf 11 method find_opt: 'a -> 'b option
34e49164
C
12
13 method haskey : 'a -> bool
14 method replkey : 'a * 'b -> 'o
15
91eba41f
C
16 (* better to implement it yourself *)
17 method virtual keys: 'a list
18
34e49164
C
19 method apply : 'a -> ('b -> 'b) -> 'o
20 method apply_with_default : 'a -> ('b -> 'b) -> (unit -> 'b) -> 'o
21
91eba41f
C
22 (* effect version *)
23 method apply_with_default2 : 'a -> ('b -> 'b) -> (unit -> 'b) -> unit
24
34e49164 25end