Home | History | Annotate | Download | only in collection

Lines Matching refs:map

33         FastSafeIterableMap<Integer, Boolean> map = new FastSafeIterableMap<>();
34 assertThat(map.ceil(1), nullValue());
35 map.putIfAbsent(1, false);
36 assertThat(map.ceil(1), nullValue());
37 map.putIfAbsent(2, false);
38 assertThat(map.ceil(2).getKey(), is(1));
39 map.remove(1);
40 assertThat(map.ceil(2), nullValue());
45 FastSafeIterableMap<Integer, Integer> map = new FastSafeIterableMap<>();
46 map.putIfAbsent(10, 20);
47 map.putIfAbsent(20, 40);
48 map.putIfAbsent(30, 60);
49 assertThat(map.putIfAbsent(5, 10), is((Integer) null));
50 assertThat(map.putIfAbsent(10, 30), is(20));
55 FastSafeIterableMap<Integer, Integer> map = new FastSafeIterableMap<>();
56 map.putIfAbsent(10, 20);
57 map.putIfAbsent(20, 40);
58 map.putIfAbsent(30, 60);
59 assertThat(map.contains(10), is(true));
60 assertThat(map.contains(11), is(false));
67 FastSafeIterableMap<Integer, Integer> map = new FastSafeIterableMap<>();
68 map.putIfAbsent(10, 20);
69 map.putIfAbsent(20, 40);
70 assertThat(map.contains(10), is(true));
71 assertThat(map.contains(20), is(true));
72 assertThat(map.remove(10), is(20));
73 assertThat(map.contains(10), is(false));
74 assertThat(map.putIfAbsent(10, 30), nullValue());
75 assertThat(map.putIfAbsent(10, 40), is(30));