Java Ordered Collections and SortedSet Muskego WI

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

Thin Air Software
414-732-2400
10437 W Innovation Dr
Milwaukee, WI
Zeon Solutions
414-475-6472
10437 W Innovation Dr
Milwaukee, WI
Acra International
414-672-0000
3742 W Lakefield DR
Milwaukee, WI
Access Technologies International
414-289-3121
840 N Old World 3rd St
Milwaukee, WI
Practice Management Solutions Inc
414-352-8160
7571 N Teutonia Ave
Milwaukee, WI
Guild Software Inc
414-259-0959
10437 W Innovation DR
Milwaukee, WI
Weyer Software Services
414-302-0321
2239 N 114th St
Milwaukee, WI
G4 Enterprise Solutions
414-389-1234
3031 W Lincoln Ave
Milwaukee, WI
HarrisData
800-225-0585
13555 Bishops Court
Brookfield, WI
PKWARE, Inc.
414-289-9788 ext 117
648 N Plankinton Ave
Milwaukee, AK



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

Guild Software Inc

414-259-0959
10437 W Innovation DR
Milwaukee, WI

Related Articles
- Java Standardization Request 168 Muskego WI
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.
- GlassFish ESB V2 for SOA Tooling Muskego WI
- Java Hashed Collections Muskego WI
- Enterprise Java Application Architecture and Design Muskego WI
- UML for Object-Oriented Design Muskego WI
Related Articles
- Java Standardization Request 168 Muskego WI
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.
- GlassFish ESB V2 for SOA Tooling Muskego WI
- Java Hashed Collections Muskego WI
- Enterprise Java Application Architecture and Design Muskego WI
- UML for Object-Oriented Design Muskego WI

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