In contrast, a map container holds objects for which the order is not important; a value is extracted from the container by providing a key that locates the value of interest.
相比之下,映射容器则用于保存那些对顺序不是很敏感的对象;通过提供可以找到关系值的密钥,就可以从容器中提取值。
I also create a specialized invocation handler that holds on to a Map where the key is the property name, and the value is the value of the property.
我还建立了一个专门的调用处理程序,它维持了一个Map,在映射里,键是属性名称,值是属性的值。
Note that the return value of a get on a Scala Map is not the actual value corresponding to the passed key.
注意,Scalamap中get的返回值实际上并不对应于传递的键。
The Map operation, written by the user, takes an input pair and produces a set of intermediate key/value pairs.
用户编写的Map操作需要输入并生成一组中间键/值对。
That is, map primarily works with and returns two elements: a key and a value.
这就是说,map主要处理和返回两个元素:一个键和一个值。
If the value matches the current map contents for the key, the key is removed. Listing 5 shows the equivalent source for this operation.
如果值匹配键的当前映射内容,那么就删除这个键。
When called, it will only remove the key from the map if the key is mapped to the specific value.
在调用时,只有当键映射到指定的值时才从map中删除这个键。
Instead, it's an Option [t] instance, either Some around the value in question, or else None, which makes it clear when the key wasn't found in the map.
相反,它是一个Option [t]实例,可以是与某个值有关的Some,也可以是None,因此可以很清晰地表示没有在map中找到键。
This becomes particularly important if it is acceptable for a given key to exist in the map but have a corresponding value of null, as is the case for the Los Angeles key in Listing 1.
如果它可以表示map上存在某个键,但是有对应的null值,这一点特别重要了。比如清单1中Losangeles键。
For example, you can access a list element with zget("/request/myList#3"), or the value of key within a map using zget("/request/myMap#key").
例如,可以通过zget("/request/myList#3")访问列表元素,或使用 zget("/request/myMap#key") 访问映射内部的 key 的值。
There is a single method to implement called map (which is parameterized based on the types of the (key,value) pair that are the input).
这里有一个名为 map的简单实现方法,该方法基于输入 (key,value) 对的类型进行参数化。
Finally, this data is written to the Context object (whose write method is parameterized based on the types of the (key, value) pair that are produced by map).
最后,这个数据被写到Context对象(它的write方法基于映射生成的(key,value)对的类型进行参数化)。
A global reverse index is simply a design where you create a map whose key is the search term, and the value is the list of keys containing an attribute with that search term.
一个全局反向索引仅仅是一个设计,其中创建的映射的键是搜索关键词,且其值是包含属性与搜索关键词的键列表。
The global context looks like a map with access through key-value pairs.
全局上下文就像通过键值对进行访问的映射。
The map message is essentially a set of key-value pairs, which makes it suitable to carry a flattened document, as described in the previous section.
映射消息实际上是一组键值对,这使它适合携带扁平结构的文档,如前文所述。
Listing 14 retrieves the current Psycho document, deletes it in CouchDB, and then recreates it by adding a new movie-title key with the current ID value and removing the ID from the map.
清单14检索当前Psycho文档,在CouchDB中删除它,然后通过添加一个带有当前id值的新movie -title键并从映射移除旧id来重新创建它。
Each ObjectGrid is composed of one or more maps, with each map consisting of a set of key and value pairs.
每个ObjectGrid都由一个或多个映射组成,而每个映射又由一组键值对组成。
When working with MapReduce, the map function's job is to pick some value to work off of, along with some key.
当使用MapReduce 进行处理时,map函数的任务是选择一些要处理的值,以及一些键。
This is a great use-case for a Map, in which each key of the Map is one of these enumerated values, and each value is the error message for that key. Listing 10 illustrates how this works.
这是映射(map)的一个绝好用例,在这里,每个映射(map)的键都是一个枚举值,而每个值都是键的错误信息。
Like the Google framework MapReduce; MR describes a way of implementing parallelism using the Map function which splits a large data into multiple key-value pairs.
如Google框架MapReduce;MR描述了一种使用Map功能实现并行性的方法,它将大型数据分割成多个键-值对。
MapReduce breaks down a problem into millions of parallel computations in the Map phase, producing as its output a stream of key-value pairs.
MapReduce在映射阶段将一个问题分解为数百万个并行计算,并生成键-值对流作为输出。
Similarly, while the Map (and its oft-chosen implementation, HashMap) are great for doing name-value or key-value pairs, there's no reason to limit yourself to these familiar tools.
虽然map(以及它的常用实现HashMap)非常适合名-值对或键-值对,但是没有理由让自己局限于这些熟悉的工具。
Map, written by a user of the MapReduce library, takes an input pair and produces a set of intermediate key/value pairs.
MapReduce库的用户指定一个Map函数,通过这个函数接收key/value对,然后产生一系列的中间key/value对。
Suppose we modify the previous example so we’re matching on the key-value pairs from a map.
我们修改一下前面一个例子,来匹配map的键值对。
Each entry and element of such a data map contains the value of a JSF input component whose ID is also the key in the data map.
这类数据地图的每个条目和元素都包含J SF输入组件的值,其ID是数据地图的键。
Each entry and element of such a data map contains the value of a JSF input component whose ID is also the key in the data map.
这类数据地图的每个条目和元素都包含J SF输入组件的值,其ID是数据地图的键。
应用推荐