2021-04-22 13:41:35 +00:00
|
|
|
import 'dart:collection';
|
|
|
|
|
|
|
|
/// Base set
|
|
|
|
///
|
|
|
|
/// @author pierre Hubert
|
|
|
|
|
|
|
|
class BaseSet<T> extends SetBase<T> {
|
|
|
|
final _set = new Set<T>();
|
|
|
|
|
|
|
|
@override
|
|
|
|
bool add(T value) => _set.add(value);
|
|
|
|
|
|
|
|
@override
|
2022-03-10 18:39:57 +00:00
|
|
|
bool contains(Object? element) => _set.contains(element);
|
2021-04-22 13:41:35 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
Iterator<T> get iterator => _set.iterator;
|
|
|
|
|
|
|
|
@override
|
|
|
|
int get length => _set.length;
|
|
|
|
|
|
|
|
@override
|
2022-03-10 18:39:57 +00:00
|
|
|
T? lookup(Object? element) => _set.lookup(element);
|
2021-04-22 13:41:35 +00:00
|
|
|
|
|
|
|
@override
|
2022-03-10 18:39:57 +00:00
|
|
|
bool remove(Object? value) => _set.remove(value);
|
2021-04-22 13:41:35 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
Set<T> toSet() => _set.toSet();
|
|
|
|
}
|