Sample Code
Familiar API. Simple syntax.
Ready for use now.
import { HashMap }
from 'typescriptcollectionsframework';
export class MapDemo {
public
products:HashMap<KeyType,ValueType>
= new HashMap<KeyType,ValueType>();
public myMethod (key : KeyType, value : ValueType) : void {
this.products.put (key, value);
let numberElements : number = this.products.size();
let offset :
number = this.products.indexOf
(key);
for (const
iter : JIterator<KeyType> =
this.products.iterator (); iter.hasNext(); ) {
const element :
KeyType = iter.next();
}
)
}