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

Correct the documentation for TreeMap's getFloorEntry and getCeilingEntry

XMLWordPrintable

      ADDITIONAL SYSTEM INFORMATION :
      openjdk version "24-ea" 2025-03-18
      OpenJDK Runtime Environment (build 24-ea+21-2447)
      OpenJDK 64-Bit Server VM (build 24-ea+21-2447, mixed mode, sharing)

      A DESCRIPTION OF THE PROBLEM :
      Proposing a minor improvement that I could suggest based on my learnings from making use of the public API `ceilingEntry`.
          /**
           * Gets the entry corresponding to the specified key; if no such entry
           * exists, returns the entry for the least key greater than the specified
           * key; if no such entry exists (i.e., the greatest key in the Tree is less
           * than the specified key), returns {@code null}.
           */
      ```
      It is not clear from the documentation that the value returned is upon the existence of the key.


            liach Chen Liang
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: