NamedTagsDictionary

NamedTagsDictionary

Represents a dictionary that can be associated with the cache items to provide extra information so that items are grouped together and can be queried efficiently based on the provided information.


Constructor

# new NamedTagsDictionary()

Initialize the NameTagsDictionary object

Methods

# add(key, value)

Adds the key value pair in named tags dictionary.

Parameters:
Name Type Description
key string

Key of an item.

value Number/Boolean/Date/String

Value of an item.

# contains(key) → {Boolean}

Search for the key in named tags dictionary and Return true if it is found and false in other case.

Parameters:
Name Type Description
key String

search this key in NamedtagsDictionary

Returns:

true if key exists otherwise false

Type
Boolean

# getCount() → {Number}

Returns the number of items in named tags dictionary.

Returns:

Total number of elements in tags dictionary.

Type
Number

# getIterator() → {Iterator}

Returns the iterator of NamedTags dictionary.

Returns:

iterator of NamedTags dictionary entries.

Type
Iterator

# getKeysIterator() → {Iterator}

Returns the iterator of NamedTags dictionary keys.

Returns:

iterator of tags dictionary keys

Type
Iterator

# getValue(key) → {Object}

Return value against key from named tags dictionary.

Parameters:
Name Type Description
key String

to be get

Returns:

return object

Type
Object

# remove(key)

Removes the key value pair from named tags dictionary

Parameters:
Name Type Description
key String

Key of an item