1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-25 06:19:22 +00:00
comunicmobile/lib/lists/groups_list.dart

29 lines
569 B
Dart
Raw Normal View History

2019-06-10 07:47:02 +00:00
import 'dart:collection';
import 'package:comunic/models/group.dart';
/// Groups list
///
/// @author Pierre HUBERT
class GroupsList extends MapBase<int?, Group> {
final Map<int?, Group?> _groups = Map();
2019-06-10 07:47:02 +00:00
@override
Group? operator [](Object? key) => _groups[key];
2019-06-10 07:47:02 +00:00
@override
void operator []=(int? key, Group? value) => _groups[key] = value;
2019-06-10 07:47:02 +00:00
@override
void clear() => _groups.clear();
@override
Iterable<int?> get keys => _groups.keys;
2019-06-10 07:47:02 +00:00
@override
Group? remove(Object? key) => _groups.remove(key);
2019-06-10 07:47:02 +00:00
Group? getGroup(int? id) => this[id];
2019-06-10 07:47:02 +00:00
}