mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:39:49 +00:00
Add methods to Set and Map which are needed for Linter
Bug: https://github.com/dart-lang/linter/issues/1307 Change-Id: Ia62aa7715509a45eb9fb0feb48c58ffee551db34 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259506 Commit-Queue: Samuel Rawlins <srawlins@google.com> Reviewed-by: Phil Quitslund <pquitslund@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
parent
27f4d280b7
commit
fb29df7fdc
|
@ -499,8 +499,10 @@ abstract class Map<K, V> {
|
|||
void addAll(Map<K, V> other);
|
||||
Map<RK, RV> cast<RK, RV>();
|
||||
bool containsKey(Object? key);
|
||||
bool containsValue(Object? value);
|
||||
void forEach(void action(K key, V value));
|
||||
V putIfAbsent(K key, V ifAbsent());
|
||||
V? remove(Object? key);
|
||||
}
|
||||
|
||||
class Null extends Object {
|
||||
|
@ -595,8 +597,13 @@ abstract class Set<E> implements Iterable<E> {
|
|||
|
||||
bool add(E value);
|
||||
void addAll(Iterable<E> elements);
|
||||
bool remove(Object? value);
|
||||
bool containsAll(Iterable<Object?> other);
|
||||
Set<E> difference(Set<Object?> other);
|
||||
Set<E> intersection(Set<Object?> other);
|
||||
E? lookup(Object? object);
|
||||
bool remove(Object? value);
|
||||
void removeAll(Iterable<Object?> elements);
|
||||
void retainAll(Iterable<Object?> elements);
|
||||
|
||||
static Set<T> castFrom<S, T>(Set<S> source, {Set<R> Function<R>()? newSet}) =>
|
||||
throw '';
|
||||
|
|
Loading…
Reference in a new issue