Java Ordered Collections and SortedSet Bridgeview IL

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.

Local Companies

Comvigo, Inc.
312-278-1115
15W675 82nd Street
Burr Ridge, IL
IFS
888-437-4968
300 Park Boulevard, Suite 555
Itasca, IL
A1 Professional Services Inc
(630) 548-2005
2859 Garden Dr
Lisle, IL
Computer Technology Group
(847) 808-4044
750 W Lake Cook Rd Ste 250
Buffalo Grove, IL
Digital Tek Services Corp
(630) 279-3080
523 S Illinois Ave
Villa Park, IL
POGEE Systems & Technologies
(708) 267-7635
10448 S. Pulaski Road
Oak Lawn, IL
InterraIT
(630) 873-3525
Two Mid America Plaza
Oakbrook Terrace, IL
Edge Information Group
(847) 297-2020
479 E Business Center Dr
Mount Prospect, IL
R K Systems Inc
(815) 932-1123
150 N Schuyler Ave
Kankakee, IL
Lakeside Legacy Foundation
(815) 455-8000
401 Country Club Rd
Crystal Lake, IL



The Java collections framework includes classes you use to maintain collections of other objects. These collection classes implement interfaces that support different organizations of the objects they contain. For example, classes that implement the List interface keep objects in the order that they are added to the collection and can take a long time to search (proportionate to the number of objects in the collection). Classes that implement the Map interface keep objects in no particular order but are very fast to search (search time is independent of the number of objects in the collection). Classes that implement the SortedSet interface keep a set of objects in a guaranteed order, independent of the order they are added to the collection; this makes them fast to search.

SortedSet



Collection classes that implement the SortedSet interface impose a total ordering on the objects that they contain. There are two kinds of orderings that can be used with a SortedSet.

Instances of SortedSet classes can use the natural ordering of objects in the collection if the objects in the collection implement the Comparable interface. This means that the order of the objects is determined by the objects themselves.


  • A SortedSet collection imposes a natural ordering on the objects it contains by calling the compareTo method that is part of the SortedSet interface. An object's compareTo method takes one argument that is the other object it compares the object to. The compareTo method returns a positive integer, 0, or a negative integer depending on whether the object is greater than, equal to, or less than the other object.
  • ...

    Read the Rest of this Article at Developer.com

Featured Local Company

POGEE Systems & Technologies

(708) 267-7635
10448 S. Pulaski Road
Oak Lawn, IL

Related Articles
- Java Standardization Request 168 Bridgeview IL
As an IT professional, it is likely that you have heard portal buzz words including JSR 168 and WSRP. But if you are like many, you may not understand the differences or the benefits of these complementary portal standards.
- Java Hashed Collections Bridgeview IL
- Enterprise Java Application Architecture and Design Bridgeview IL
- UML for Object-Oriented Design Bridgeview IL
- GlassFish ESB V2 for SOA Tooling Bridgeview IL
Related Articles
- Java Standardization Request 168 Bridgeview IL
As an IT professional, it is likely that you have heard portal buzz words including JSR 168 and WSRP. But if you are like many, you may not understand the differences or the benefits of these complementary portal standards.
- Java Hashed Collections Bridgeview IL
- Enterprise Java Application Architecture and Design Bridgeview IL
- UML for Object-Oriented Design Bridgeview IL
- GlassFish ESB V2 for SOA Tooling Bridgeview IL
Related Local Events
BIO - International Convention and Exhibition for Biotechnology
Dates: 5/2/2010 - 5/5/2010
Location: McCormick Place
Chicago, IL
View Details

PTXi - Process Technology Expo International
Dates: 5/4/2010 - 5/6/2010
Location: Donald E. Stephens Convention Center
Rosemont, IL
View Details

Virtualization / Consolidation Strategies - Implementation Strategies
Dates: 12/10/2009 - 12/10/2009
Location: The Donald E. Stephens Convention Center
Rosemont, IL
View Details

The CIO Agenda - 2010 and Beyond
Dates: 11/5/2009 - 11/5/2009
Location: The Donald E. Stephens Convention Center
Rosemont, IL
View Details

SuperComm
Dates: 10/21/2009 - 10/23/2009
Location: McCormick Place, Chicago
Chicago, IL
View Details

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