Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Override equals and compare on map item

  • Loading branch information...
commit e14cf49343cff39ef50c75e07e8942b099962f34 1 parent f03d1a6
Kris Kowal authored

Showing 1 changed file with 8 additions and 0 deletions. Show diff stats Hide diff stats

  1. +8 0 generic-map.js
8 generic-map.js
@@ -157,3 +157,11 @@ function Item(key, value) {
157 157 this.value = value;
158 158 }
159 159
  160 +Item.prototype.equals = function (that) {
  161 + return Object.equals(this.key, that.key) && Object.equals(this.value, that.value);
  162 +};
  163 +
  164 +Item.prototype.compare = function (that) {
  165 + return Object.compare(this.key, that.key);
  166 +};
  167 +

0 comments on commit e14cf49

Please sign in to comment.
Something went wrong with that request. Please try again.