Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4155650

(coll) Sorted Collection Classes with bidirectional navigation

XMLWordPrintable



      Name: rm29839 Date: 07/08/98


      I am trying to do some interpolation, at Reuters.

      A clean implementation is to use the

      map.get( key )

      to return an interpolated value, if the real value does not exist.

      However in doing this I would like to access
      n-keys either side of the key I am requesting.

      The current SortMap interface only allows me to get at the value either side of the key value (using headMap.lastKey() &
      tailMap.firstKey() ).

      This is inadequate for some kinds of interpolation where I need several keys either side of the key in question.

      As a general solution to this problem it seems reasonable that Sorted classes should return a ListIterator as well as an iterator.
      (Review ID: 34731)
      ======================================================================

            martin Martin Buchholz
            rmandelsunw Ronan Mandel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: