Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #23896

Re: Alternative to TreeSet?

From Roedy Green <see_website@mindprod.com.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Alternative to TreeSet?
Organization Canadian Mind Products
Message-ID <vaaio813249siheq7dhmttke8uln8pnk51@4ax.com> (permalink)
References <2ce32328-92a2-4fa3-8f23-27202009ac66@googlegroups.com>
Date 2013-05-07 09:21 -0700

Show all headers | View raw


On Mon, 6 May 2013 08:10:48 -0700 (PDT), laredotornado@zipmail.com
wrote, quoted or indirectly quoted someone who said :

>TreeSet doesn't do the job.

Yet another approach is to extract some fields from your objects and
create a new object type for which you can safely redefine  your
natural comparisons. In that object can be a reference to the original
object.
-- 
Roedy Green Canadian Mind Products http://mindprod.com
Nothing is so good as it seems beforehand. 
 ~ George Eliot (born: 1819-11-22 died: 1880-12-22 at age: 61) (Mary Ann Evans)

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Alternative to TreeSet? laredotornado@zipmail.com - 2013-05-06 08:10 -0700
  Re: Alternative to TreeSet? Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-05-06 11:19 -0400
    Re: Alternative to TreeSet? Lew <lewbloch@gmail.com> - 2013-05-06 11:33 -0700
    Re: Alternative to TreeSet? Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-05-06 18:01 -0300
  Re: Alternative to TreeSet? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-05-06 08:25 -0700
    Re: Alternative to TreeSet? Robert Klemme <shortcutter@googlemail.com> - 2013-05-07 07:58 +0200
  Re: Alternative to TreeSet? Roedy Green <see_website@mindprod.com.invalid> - 2013-05-07 09:21 -0700
  Re: Alternative to TreeSet? Sven Köhler <remove-sven.koehler@gmail.com> - 2013-05-07 19:36 +0300

csiph-web