Solved

Map  Collection Views

Posted on 2011-09-07
3
216 Views
Last Modified: 2012-05-12
I would like to know about Map  Collection Views . what are different types of it. when, how, where, why we use them. i am not clear on this concept. thanks in advance
0
Comment
Question by:gudii9
  • 2
3 Comments
 
LVL 47

Expert Comment

by:for_yan
ID: 36495784

This is from doc API:
http://download.oracle.com/javase/1.4.2/docs/api/java/util/Map.html

The Map interface provides three collection views, which allow a map's contents to be viewed as a set of keys, collection of values, or set of key-value mappings. The order of a map is defined as the order in which the iterators on the map's collection views return their elements. Some map implementations, like the TreeMap class, make specific guarantees as to their order; others, like the HashMap class, do not.
0
 
LVL 7

Author Comment

by:gudii9
ID: 36639500
>>The Map interface provides three collection views

what is collection view. please elaborate on this. does any other collection objects like set, list etc has collection views?
0
 
LVL 47

Accepted Solution

by:
for_yan earned 500 total points
ID: 36643779
They just explain that when considering the Map interface we
can think of te set of keys, collection of vlaues or babout set of Key-Value entries
It just comes form the nature of what is a Map as entity which maps one object to another and has a set of such pairs.
Once there is a set of these pairs - you may think about the set of keys, you may think about collection of values (values may be duplicates, so they are not set,
as we name by Set -a collection which does not have duplicates).

If you think about say ArrayList - you'll not have idea about such other collections whiach are so naturally related
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Weekend adv creator 3 64
servlet example 17 58
maven disable workspace resolution 1 37
import as existing maven project 3 34
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question