Java Ordered Collections and SortedSet Amityville NY

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

autofunds.com
(888) 903-8637
775 Park Avenue
Huntington, NY
Pyxis Solutions
(212) 363-2828
55 Broad St Rm 28B
New York, NY
Newbridge Technology
(212) 352-7005
233 W 17th St
New York, NY
J M W Enterprises
(212) 244-5488
5 W 36th St
New York, NY
Xt Group Inc
(631) 224-3602
3500 Sunrise Hwy
Great River, NY
OpenLink
516-227-6600
1502 Reckson Plaza
Uniondale, NY
For the Record
(518) 398-9601
Pine Plains, NY
Stuyvesant Software Inc
(518) 758-1916
Stuyvesant, NY
Informatica Ecs Inc
(585) 256-0401
867 Meigs St
Rochester, NY
Web Energy Net
(718) 274-0978
1940 42nd St
Astoria, NY



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

OpenLink

516-227-6600
1502 Reckson Plaza
Uniondale, NY
http://www.olf.com

Related Articles
- Java Hashed Collections Amityville NY
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.
- UML for Object-Oriented Design Amityville NY
- Enterprise Java Application Architecture and Design Amityville NY
- Java Standardization Request 168 Amityville NY
- GlassFish ESB V2 for SOA Tooling Amityville NY
Related Articles
- Java Hashed Collections Amityville NY
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.
- UML for Object-Oriented Design Amityville NY
- Enterprise Java Application Architecture and Design Amityville NY
- Java Standardization Request 168 Amityville NY
- GlassFish ESB V2 for SOA Tooling Amityville NY
Related Local Events
Biotechnica America
Dates: 4/20/2010 - 4/22/2010
Location: Jacob K. Javits Convention Center
New York, NY
View Details

TradeTech USA
Dates: 3/1/2010 - 3/3/2010
Location: Marriott Marquis New York
New York, NY
View Details

BIO CEO & INVESTOR CONFERENCE 2010
Dates: 2/8/2010 - 2/8/2010
Location: Waldorf-Astoria
New York, NY
View Details

I.T. Committee Meeting
Dates: 12/17/2009 - 12/17/2009
Location: Queens Chamber Board Room
Jackson Heights, NY
View Details

I.T. Committee Meeting
Dates: 11/19/2009 - 11/19/2009
Location: Queens Chamber Board Room
Jackson Heights, NY
View Details

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