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


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

Re: SortedMap: getting value for largest key less or equal a given

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx02.iad01.newshosting.com!newshosting.com!newspump.sol.net!news-out.readnews.com!transit3.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!53ab2750!not-for-mail
From "Andreas Leitgeb" <andreas.leitgeb@1:261/38.remove-gby-this>
Subject Re: SortedMap: getting value for largest key less or equal a given
Message-ID <501D725E.56138.calajapr@time.synchro.net> (permalink)
X-Comment-To Andreas Leitgeb
Newsgroups comp.lang.java.programmer
In-Reply-To <501D725E.56137.calajapr@time.synchro.net>
References <501D725E.56137.calajapr@time.synchro.net>
X-FTN-AREA COMP.LANG.JAVA.PROGRAMMER
X-FTN-MSGID 1:261/38 c8d8a81d
X-FTN-REPLY 1:261/38 bce51978
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.16a-Win32 NewsLink 1.98]
Lines 43
Date Sat, 04 Aug 2012 19:43:55 GMT
NNTP-Posting-Host 69.21.70.65
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1344109435 69.21.70.65 (Sat, 04 Aug 2012 14:43:55 CDT)
NNTP-Posting-Date Sat, 04 Aug 2012 14:43:55 CDT
Organization tds.net
X-Received-Bytes 2654
Xref csiph.com comp.lang.java.programmer:17179

Show key headers only | View raw


  To: Andreas Leitgeb
From: "Andreas Leitgeb" <andreas.leitgeb@1:261/38.remove-5qr-this>

  To: Andreas Leitgeb
From: "Andreas Leitgeb" <andreas.leitgeb@1:261/38.remove-yy0-this>

  To: Andreas Leitgeb
From: "Andreas Leitgeb" <andreas.leitgeb@1:261/38.remove-s5y-this>

  To: Andreas Leitgeb
From: Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at>

Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> wrote:
> I've got an approach like the following, but I'm not entirely
> happy with it...

It took me about an hour to compose that previous post, and not only did a bug 
still hide in it ("map" instead of "m_map"), but also: only five minutes after 
posting, it occurred to me that I could also look at TreeMap's methods, rather 
than only at SortedMap's, and thereby stumbled over the (new in 1.6) interface 
NavigableMap.

PS: return m_map.floorEntry(k).getValue(); // :-) Case closed.

-+- BBBS/Li6 v4.10 Dada-1
 + Origin: Prism bbs (1:261/38)
-+- Synchronet 3.16a-Win32 NewsLink 1.98
Time Warp of the Future BBS - telnet://time.synchro.net:24

-+- BBBS/Li6 v4.10 Dada-1
 + Origin: Prism bbs (1:261/38)
-+- Synchronet 3.16a-Win32 NewsLink 1.98
Time Warp of the Future BBS - telnet://time.synchro.net:24

-+- BBBS/Li6 v4.10 Dada-1
 + Origin: Prism bbs (1:261/38)
-+- Synchronet 3.16a-Win32 NewsLink 1.98
Time Warp of the Future BBS - telnet://time.synchro.net:24

--- BBBS/Li6 v4.10 Dada-1
 * Origin: Prism bbs (1:261/38)
--- Synchronet 3.16a-Win32 NewsLink 1.98
Time Warp of the Future BBS - telnet://time.synchro.net:24

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


Thread

SortedMap: getting value for largest key less or equal a given "Andreas Leitgeb" <andreas.leitgeb@1:261/38.remove-gby-this> - 2012-08-04 19:43 +0000
  Re: SortedMap: getting value for largest key less or equal a given "Andreas Leitgeb" <andreas.leitgeb@1:261/38.remove-gby-this> - 2012-08-04 19:43 +0000
    Re: SortedMap: getting value for largest key less or equal a given "markspace" <markspace@1:261/38.remove-gby-this> - 2012-08-04 19:43 +0000

csiph-web