14 lines
275 B
Dart
14 lines
275 B
Dart
|
import 'person.dart';
|
||
|
|
||
|
class PersonDataAccessMap {
|
||
|
final Map<int, Person> _persons = {};
|
||
|
|
||
|
void store(Person p) => _persons[p.id] = p;
|
||
|
|
||
|
Person? retrieve(int personId) => _persons[personId];
|
||
|
|
||
|
List<Person> retrieveAll() => _persons.values.toList();
|
||
|
|
||
|
void close() {}
|
||
|
}
|