Lucene - Core
  1. Lucene - Core
  2. LUCENE-2931

Improved javadocs for PriorityQueue#lessThan

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.9.5, 3.0.4, 3.1, 4.0-ALPHA
    • Fix Version/s: 2.9.5, 3.0.4, 3.1, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      It kills me that I have to inspect the code every time I implement a PriorityQueue.

        Activity

        Karl Wettin created issue -
        Hide
        Karl Wettin added a comment - - edited
        Index: src/java/org/apache/lucene/util/PriorityQueue.java
        ===================================================================
        --- src/java/org/apache/lucene/util/PriorityQueue.java	(revision 1072471)
        +++ src/java/org/apache/lucene/util/PriorityQueue.java	(working copy)
        @@ -31,8 +31,11 @@
           private int maxSize;
           protected T[] heap;
         
        -  /** Determines the ordering of objects in this priority queue.  Subclasses
        -    must define this one method. */
        +  /** 
        +   * Determines the ordering of objects in this priority queue.  Subclasses
        +   * must define this one method.
        +   * @return true if parameter a is less than parameter b. 
        +   */
           protected abstract boolean lessThan(T a, T b);
         
           /**
        
        Show
        Karl Wettin added a comment - - edited Index: src/java/org/apache/lucene/util/PriorityQueue.java =================================================================== --- src/java/org/apache/lucene/util/PriorityQueue.java (revision 1072471) +++ src/java/org/apache/lucene/util/PriorityQueue.java (working copy) @@ -31,8 +31,11 @@ private int maxSize; protected T[] heap; - /** Determines the ordering of objects in this priority queue. Subclasses - must define this one method. */ + /** + * Determines the ordering of objects in this priority queue. Subclasses + * must define this one method. + * @ return true if parameter a is less than parameter b. + */ protected abstract boolean lessThan(T a, T b); /**
        Hide
        Simon Willnauer added a comment -

        It kills me that I have to inspect the code every time I implement a PriorityQueue.

        its a no-brainer ey - thanks I will add to trunk and backport

        Show
        Simon Willnauer added a comment - It kills me that I have to inspect the code every time I implement a PriorityQueue. its a no-brainer ey - thanks I will add to trunk and backport
        Simon Willnauer made changes -
        Field Original Value New Value
        Assignee Simon Willnauer [ simonw ]
        Fix Version/s 2.9.5 [ 12315914 ]
        Fix Version/s 3.0.4 [ 12315913 ]
        Fix Version/s 3.1 [ 12314822 ]
        Fix Version/s 4.0 [ 12314025 ]
        Affects Version/s 2.9.5 [ 12315914 ]
        Affects Version/s 3.0.4 [ 12315913 ]
        Affects Version/s 3.1 [ 12314822 ]
        Affects Version/s 4.0 [ 12314025 ]
        Affects Version/s 3.0.3 [ 12315147 ]
        Simon Willnauer committed 1072567 (1 file)
        Reviews: none

        LUCENE-2931: Improved javadocs for PriorityQueue#lessThan

        Simon Willnauer committed 1072571 (42 files)
        Reviews: none

        LUCENE-2931: Improved javadocs for PriorityQueue#lessThan

        Lucene lucene_3_0
        Simon Willnauer committed 1072580 (41 files)
        Reviews: none

        LUCENE-2931: Improved javadocs for PriorityQueue#lessThan

        Lucene lucene_2_9
        Hide
        Simon Willnauer added a comment -

        Committed to trunk in r1072567 & backported:

        • 3x: r1072569
        • 3.0: r1072571
        • 2.9: r1072580
        Show
        Simon Willnauer added a comment - Committed to trunk in r1072567 & backported: 3x: r1072569 3.0: r1072571 2.9: r1072580
        Simon Willnauer made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Grant Ingersoll added a comment -

        Bulk close for 3.1

        Show
        Grant Ingersoll added a comment - Bulk close for 3.1
        Grant Ingersoll made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Simon Willnauer
            Reporter:
            Karl Wettin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development