?
Solved

Map  Collection Views

Posted on 2011-09-07
3
Medium Priority
?
234 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn different types of Android Layout and some basics of an Android App.
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…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Suggested Courses
Course of the Month15 days, 13 hours left to enroll

850 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