starling-framework
Version:
A fast, productive library for 2D cross-platform development.
73 lines (55 loc) • 1.91 kB
JavaScript
// Class: haxe.ds._HashMap.HashMap_Impl_
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../../hxClasses_stub").default;
var $hxEnums = require("./../../../hxEnums_stub").default;
var $import = require("./../../../import_stub").default;
function haxe_ds__$HashMap_HashMapData() {return require("./../../../haxe/ds/_HashMap/HashMapData");}
// Constructor
var HashMap_Impl_ = function(){}
// Meta
HashMap_Impl_.__name__ = "haxe.ds._HashMap.HashMap_Impl_";
HashMap_Impl_.__isInterface__ = false;
HashMap_Impl_.prototype = {
};
HashMap_Impl_.prototype.__class__ = HashMap_Impl_.prototype.constructor = $hxClasses["haxe.ds._HashMap.HashMap_Impl_"] = HashMap_Impl_;
// Init
// Statics
HashMap_Impl_._new = function() {
var this1 = new (haxe_ds__$HashMap_HashMapData().default)();
return this1;
}
HashMap_Impl_.set = function(this1,k,v) {
this1.keys.set(k.hashCode(),k);
this1.values.set(k.hashCode(),v);
}
HashMap_Impl_.get = function(this1,k) {
return this1.values.get(k.hashCode());
}
HashMap_Impl_.exists = function(this1,k) {
return this1.values.exists(k.hashCode());
}
HashMap_Impl_.remove = function(this1,k) {
this1.values.remove(k.hashCode());
return this1.keys.remove(k.hashCode());
}
HashMap_Impl_.keys = function(this1) {
return this1.keys.iterator();
}
HashMap_Impl_.copy = function(this1) {
var copied = new (haxe_ds__$HashMap_HashMapData().default)();
copied.keys = this1.keys.copy();
copied.values = this1.values.copy();
return copied;
}
HashMap_Impl_.iterator = function(this1) {
return this1.values.iterator();
}
HashMap_Impl_.clear = function(this1) {
this1.keys.clear();
this1.values.clear();
}
// Export
exports.default = HashMap_Impl_;