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

add peekFirst and peekLast methods to NavigableSet

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • None
    • core-libs
    • None

      It seems like NavigableSet ought to have null-returning peekFirst and peekLast methods. These would pair nicely with the existing null-returning pollFirst and pollLast methods that are already present. It would make NavigableSet more like Deque (which has null-returning peek* and poll* methods) and like NavigableMap (which has null-returning first/lastEntry and pollFirst/LastEntry methods).

            smarks Stuart Marks
            smarks Stuart Marks
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: