Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extendable map class #13261

Closed
danschultz opened this issue Sep 11, 2013 · 2 comments
Closed

Add extendable map class #13261

danschultz opened this issue Sep 11, 2013 · 2 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant core-n type-enhancement A request for a change that isn't a bug

Comments

@danschultz
Copy link

It'd be useful to have a standard way in the SDK to extend Map. This way, it can be reused across SDK and community packages. It'd also be useful to specify which type of map you want to use. For instance:

class ExtendableMap<K, V> implements Map {
  Map<K, V> _map = new HashMap();

  ExtendableMap();

  ExtendableMap.use(this._map);

  void operator []=(K key, V value) {
    _map[key] = value;
  }
}

Then in subclasses:

class CustomMap extends ExtendableMap {
  CustomMap() : super.use(new LinkedHashMap());
}

See discussion here: https://groups.google.com/a/dartlang.org/forum/#!topic/misc/Sj3guf3es24.

@justinfagnani
Copy link
Contributor

We have this in quiver.collection with the DelegatingMap

http://google.github.io/quiver-dart/docs/quiver.collection/DelegatingMap.html

@dgrove
Copy link
Contributor

dgrove commented Sep 17, 2013

Removed Type-Defect label.
Added Type-Enhancement, Area-Library, Triaged labels.

@danschultz danschultz added Type-Enhancement area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. labels Sep 17, 2013
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed priority-unassigned labels Feb 29, 2016
@lrhn lrhn added the core-m label Aug 11, 2017
@floitschG floitschG added core-n area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. and removed core-m area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. labels Aug 28, 2017
@matanlurey matanlurey added the closed-obsolete Closed as the reported issue is no longer relevant label Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant core-n type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

7 participants