Java Hashed Collections Kansas

The Java collections framework contains classes you use to maintain collections of other objects. These collection classes have different performance and ordering properties. See how the HashMap and HashSet Classes allow objects to be added to a collection, removed from a collection, or found in roughly constant time. Discover how to use these classes and what to do to achieve good performance from them.

Local Companies

Midwest CAM Solutions (GibbsCAM)
877-444-0982
NOW SERVING: KANSAS
Wichita, KS
Professional Software Inc
(316) 269-4264
800 E 1st St Ste 150
Wichita, KS
Radio Shack Dealer
(913) 755-2772
537 Main St
Osawatomie, KS
Jass Consulting Llc
(913) 837-5392
PO Box 1122
Louisburg, KS
Brainworks Software
(316) 722-8100
7570 W 21st St N
Wichita, KS
Mersoft Corporation
913-871-6196
9300 W. 110th Street
Overland Park, KS
Access Group LLC
(316) 264-0270
348 Ida St.
Wichita, KS
Allen Gibbs & Houlik L C Agh
(316) 267-7231
301 N Main St Ste 1700 Epic Center
Wichita, KS
First Student Inc
(913) 294-4425
1010 N Pearl St
Paola, KS
Backup Solutions
(316) 944-4448
2707 W Douglas Ave Ste B
Wichita, KS

HashMap and HashSet



The HashMap and HashSet classes provide two different but similar ways to organize a set of objects using the same underlying data structure.

The HashSet class is used to manage a set of objects that have unique values. Passing an object to a HashSet object's add method will add the object to the HashSet unless there is already an object in the HashSet that equals the object passed to the add method. There is also a contains method to find an object in a set and a remove method to remove an object from a set.

The HashMap class organizes objects into pairs. There are two roles in each pair. These roles are key and value. A HashMap object organizes the pairs of objects so that no two pairs have equal keys. This means that, for each key in a HashMap, there is exactly one corresponding value.

The HashMap class has a put method that is passed a key and value pair. If the key is not already in the HashMap, the pair is added to the HashMap. If the key is already present in the HashMap, the given value replaces the previous value associated with the key. There is also a get method that returns the value associated with a given key and a remove method that removes the key-value pair for a given key.

A HashMap is like a HashSet with each object in the set having an associated value. The HashSet class is implemented as a wrapper around HashMap that uses the same object for both the key and value of each object pair.

Read the Rest of this Article at Developer.com

Featured Local Company

Mersoft Corporation

913-871-6196
9300 W. 110th Street
Overland Park, KS
http://www.mersoft.com

Related Articles
- Java Ordered Collections and SortedSet Kansas
This article explores Java collections framework classes that implement the SortedSet interface and how they keep a set of objects in a guaranteed order, independent of the order that they are added to the collection.
- UML for Object-Oriented Design Kansas
- GlassFish ESB V2 for SOA Tooling Kansas
- Java Standardization Request 168 Kansas
- Enterprise Java Application Architecture and Design Kansas
Related Articles
- Java Ordered Collections and SortedSet Kansas
This article explores Java collections framework classes that implement the SortedSet interface and how they keep a set of objects in a guaranteed order, independent of the order that they are added to the collection.
- UML for Object-Oriented Design Kansas
- GlassFish ESB V2 for SOA Tooling Kansas
- Java Standardization Request 168 Kansas
- Enterprise Java Application Architecture and Design Kansas
Related Local Event
Influencing without Authority
Dates: 12/3/2009 - 12/3/2009
Location: CMD Training Center WSU campus
Wichita, KS
View Details

Topics: 
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML