Learn R Programming

datastructures (version 0.2.9)

hashmap: Create a new hashmap

Description

Instantiates a new '>hashmap object, i.e. an unordered collection of key-value pairs with mapping $$f: keys -> values$$, where only unique key-value pairs can be stored.

Usage

hashmap(key.class = c("character", "numeric", "integer"))

Arguments

key.class

the primitive class type of the keys

Value

returns a new hashmap object

Examples

Run this code
# NOT RUN {
 # creates a hashmap<character, SEXP>
 h <- hashmap()

 # creates a hashmap<integer, SEXP>
 h <- hashmap("integer")

 # creates a hashmap<numeric, SEXP>
 h <- hashmap("numeric")

# }

Run the code above in your browser using DataLab