on_missing_key: On missing key behaviour

Description Usage Arguments Details Value Author(s) Examples

View source: R/generics.R

Description

These generics are used to get or set the behaviour of an hashmap upon query of a missing key (currently, only an hashmap method is implemented).

Usage

1
2
3
4
5
6
7
8
9
on_missing_key(x)

on_missing_key(x) <- value

## S3 method for class 'r2r_hashmap'
on_missing_key(x)

## S3 replacement method for class 'r2r_hashmap'
on_missing_key(x) <- value

Arguments

x

an hashmap.

value

a string, either "throw" or "default". Action to be taken upon query of a missing key.

Details

For more details, see the hashtable documentation page.

Value

a string, either "throw" or "default".

Author(s)

Valerio Gherardi

Examples

1
2
3
m <- hashmap()
on_missing_key(m)
on_missing_key(m) <- "throw"

r2r documentation built on July 6, 2021, 5:12 p.m.