Solved

Map  Collection Views

Posted on 2011-09-07
3
211 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
Comment Utility

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
Comment Utility
>>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
Comment Utility
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 your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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 “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

762 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now