Solved

Map  Collection Views

Posted on 2011-09-07
3
213 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Application launch issue with Apache Tomcat 5 43
Java exception bubble up 2 18
servlet web applications   metadata-complete="true" or false 3 39
throw exception 21 44
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 …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This video teaches viewers about errors in exception handling.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

770 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