TLA Line data Source code
1 : // Copyright (c) 2026 Flipdare Pty Ltd. All rights reserved.
2 : //
3 : // This file is part of Flipdare's proprietary software and contains
4 : // confidential and copyrighted material. Unauthorised copying,
5 : // modification, distribution, or use of this file is strictly
6 : // prohibited without prior written permission from Flipdare Pty Ltd.
7 : //
8 : // This software includes third-party components licensed under MIT,
9 : // BSD, and Apache 2.0 licences. See THIRD_PARTY_NOTICES for details.
10 : //
11 :
12 : class EnumMap<K extends Enum, T> {
13 : final Map<K, T> _map;
14 :
15 HIT 1 : const EnumMap(Map<K, T> map) : _map = map;
16 :
17 3 : T? operator [](K key) => _map[key];
18 :
19 1 : void operator []=(K key, T value) {
20 2 : _map[key] = value;
21 : }
22 :
23 3 : Iterable<K> get keys => _map.keys;
24 :
25 3 : Iterable<T> get values => _map.values;
26 :
27 3 : bool containsKey(K key) => _map.containsKey(key);
28 :
29 MIS 0 : @override
30 0 : String toString() => _map.toString();
31 : }
|