Java Ordered Collections and SortedSet Delray Beach FL

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

Palm Beach Software Design, Inc.
572-0233
1101 N. Congress Ave., Ste. 202
Boynton Beach, FL
Computer Resolutions
582-5588 phone/fax
104 Half Moon Circle, #C-3
Lantana, FL
Eastside Computer Solutions
(561) 278-3033
1700 Depot Ave
Delray Beach, FL
First Student
(904) 296-2829
6675 Corporate Center Pkw
Jacksonville, FL
Microtouch Solutions
(786) 497-1344
3399 NW 72nd Ave
Miami, FL
Can Do Networking
369-7748
706 W. Boynton Beach Blvd., #114
Boynton Beach, FL
Palm Beach Software Design, Inc.
572-0233
1101 N. Congress Ave., Ste. 202
Boynton Beach, FL
NetOne Technologies, Inc.
432-7823
7403 Langston Ct.
Lake Worth, FL
MacRon Technologies Inc
(813) 248-9730
1024 S 50th St
Tampa, FL
Compulink Installation Services Inc
(239) 444-1738
27499 Riverview Center Blv
Bonita Springs, FL

 



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

Can Do Networking

369-7748
706 W. Boynton Beach Blvd., #114
Boynton Beach, FL

Related Articles
- Enterprise Java Application Architecture and Design Delray Beach FL
Discover how to combine the Model-View-Controller (MVC) architectural principles with the Java EE platform to derive multitier Java EE application architecture. You will also see how the Java EE design patterns catalog provides guidance and how you can document this architecture using UML notations.
- Java Hashed Collections Delray Beach FL
- GlassFish ESB V2 for SOA Tooling Delray Beach FL
- UML for Object-Oriented Design Delray Beach FL
- Java Standardization Request 168 Delray Beach FL
Related Articles
- Enterprise Java Application Architecture and Design Delray Beach FL
Discover how to combine the Model-View-Controller (MVC) architectural principles with the Java EE platform to derive multitier Java EE application architecture. You will also see how the Java EE design patterns catalog provides guidance and how you can document this architecture using UML notations.
- Java Hashed Collections Delray Beach FL
- GlassFish ESB V2 for SOA Tooling Delray Beach FL
- UML for Object-Oriented Design Delray Beach FL
- Java Standardization Request 168 Delray Beach FL
Related Local Events
Wednesday Evening Referral Group
Dates: 5/5/2010 - 5/7/2010
Location: WineStyles
Coral Springs, FL
View Details

Wake Up Coral Springs Breakfast!!
Dates: 6/15/2010 - 6/15/2010
Location: Marriott Heron Bay
Coral Springs, FL
View Details

Afternoon Chamber Referral Group
Dates: 7/1/2010 - 7/1/2010
Location: The Coral Springs Chamber Office
Coral Springs, FL
View Details

Morning Chamber Referral Group Meeting
Dates: 7/22/2010 - 7/22/2010
Location: La Quinta Hotel
Coral Springs, FL
View Details

Afternoon Chamber Referral Group
Dates: 3/4/2010 - 3/4/2010
Location: The Coral Springs Chamber Office
Coral Springs, FL
View Details

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