dw.util
Class Map
Object
dw.util.Map
Represents a Map of objects.
All Known Subclasses
Properties
empty  :  boolean  (Read Only)
Identifies if this map is empty.
static EMPTY_MAP  :  Map
Convenience variable, for an empty and immutable list.
length  :  Number  (Read Only)
The size of the map. This is a bean attribute method and supports the access to the collections length similar to a ECMA array, such as 'products.length'.
Constructor Summary
This class does not have a constructor, so you cannot create it directly. To get an instance of this class, use one of the subclass constructors.
Method Summary
clear() : void
Clears the map of all objects.
containsKey(key : Object) : boolean
Identifies if this map contains an element identfied by the specified key.
containsValue(value : Object) : boolean
Identifies if this map contains an element identfied by the specified value.
entrySet() : Set
Returns a set of the map's entries.
get(key : Object) : Object
Returns the object associated with the key or null.
getLength() : Number
REturns the size of the map.
isEmpty() : boolean
Identifies if this map is empty.
keySet() : Set
Returns a set of the map's keys.
put(key : Object, value : Object) : Object
Puts the specified value into the map using the specified key to identify it.
putAll(other : Map) : void
Copies all of the objects inside the specified map into this map.
remove(key : Object) : Object
Removes the object from the map that is identified by the key.
size() : Number
Returns the size of the map.
values() : Collection
Returns a collection of the values contained in this map.
values() : Collection
Returns a collection of the values contained in this map.
Salesforce Commerce Cloud Courses
Salesforce B2C Commerce Developer - Certification Tests
Why risk failing the SFCC exam? Get 180 real questions, killer content, and everything you need to crush the Salesforce B2C Commerce Developer certification.

Becoming a Salesforce B2C Commerce Developer is your ticket to higher salaries, better job opportunities, and the credibility to stand out from the competition. But let's be honestβ€”passing the certification exam isn't easy. That's where we come in.
Salesforce Javascript Developer I - Certification Tests
Not just another prep courseβ€”this is your shortcut to passing. Master JavaScript for Salesforce and go from 'hoping to pass' to knowing you will. Ready to start?

This isn't just another prep courseβ€”it's your shortcut to mastering the skills and confidence you need to pass. With multiple practice tests covering every section and a final exam simulation designed to mirror the real thing, you'll feel like you've already aced it before test day.
Salesforce B2C Commerce Architect - Certification Tests
Think the Developer exam was hard? Welcome to the next level.

The Salesforce B2C Commerce Architect certification is a whole different gameβ€”complex solutions, elevated difficulty, and skills that set you apart in the eCommerce industry. That's why we're including 11 downloadable PDF guides, packed with best practices and strategies to help you prepare for the exam and build confidence in every topic.
Method Detail
clear
clear() : void
Clears the map of all objects.

containsKey
containsKey(key : Object) : boolean
Identifies if this map contains an element identfied by the specified key.
Parameters:
key - the key to use.
Returns:
true if this map contains an element whose key is equal to the specified key.

containsValue
containsValue(value : Object) : boolean
Identifies if this map contains an element identfied by the specified value.
Parameters:
value - the value to use.
Returns:
true if this map contains an element whose value is equal to the specified value.

entrySet
entrySet() : Set
Returns a set of the map's entries. The returned set is actually a view to the entries of this map.
Returns:
a set of the map's entries.

get
get(key : Object) : Object
Returns the object associated with the key or null.
Parameters:
key - the key to use.
Returns:
the object associated with the key or null.

getLength
getLength() : Number
REturns the size of the map. This is a bean attribute method and supports the access to the collections length similar to a ECMA array, such as 'products.length'.
Returns:
the number of objects in the map.

isEmpty
isEmpty() : boolean
Identifies if this map is empty.
Returns:
true if the map is empty, false otherwise.

keySet
keySet() : Set
Returns a set of the map's keys. The returned set is actually a view to the keys of this map.
Returns:
a set of the map's keys.

put
put(key : Object, value : Object) : Object
Puts the specified value into the map using the specified key to identify it.
Parameters:
key - the key to use to identify the value.
value - the object to put into the map.
Returns:
previous value associated with specified key, or null if there was no mapping for key.

putAll
putAll(other : Map) : void
Copies all of the objects inside the specified map into this map.
Parameters:
other - the map whose contents are copied into this map.

remove
remove(key : Object) : Object
Removes the object from the map that is identified by the key.
Parameters:
key - the key that identifies the object to remove.
Returns:
the removed object or null.

size
size() : Number
Returns the size of the map.
Returns:
the number of objects in the map.

values
values() : Collection
Returns a collection of the values contained in this map.
API Versioned:
No longer available as of version 16.1. Returns an independent modifiable collection holding all values.
Returns:
a collection of the values contained in this map

values
values() : Collection
Returns a collection of the values contained in this map.
API Versioned:
From version 16.1. Returns a view on the values of this map like keySet() and entrySet() do. Former version returned a shallow copy of this.
Returns:
a collection of the values contained in this map

β™₯
Notifications pending to read