src/main/java/org/jboss/util/timeout/HashedTimeoutPriorityQueueImpl.java
/**
       * Check invariants of the queue.
       */
Check invariants of the queue.
Check invariants of the queue .
void checkTree()
      {
         assertExpr(size >= 0);
         assertExpr(size < queue.length);
         assertExpr(queue[0] == null);
         if (size > 0)
         {
            assertExpr(queue[1] != null);
            assertExpr(queue[1].index == 1);
            assertExpr(queue[1].queue == this);
            for (int i = 2; i <= size; ++i)
            {
               assertExpr(queue[i] != null);
               assertExpr(queue[i].index == i);
               assertExpr(queue[i].queue == this);
               assertExpr(queue[i >> 1].time <= queue[i].time); 
            }
            for (int i = size + 1; i < queue.length; ++i)
               assertExpr(queue[i] == null);
         }
      }
void checkTree ( ) { assertExpr ( size >= 0 ) ; assertExpr ( size < queue . length ) ; assertExpr ( queue [ 0 ] == null ) ; if ( size > 0 ) { assertExpr ( queue [ 1 ] != null ) ; assertExpr ( queue [ 1 ] . index == 1 ) ; assertExpr ( queue [ 1 ] . queue == this ) ; for ( int i = 2 ; i <= size ; ++ i ) { assertExpr ( queue [ i ] != null ) ; assertExpr ( queue [ i ] . index == i ) ; assertExpr ( queue [ i ] . queue == this ) ; assertExpr ( queue [ i >> 1 ] . time <= queue [ i ] . time ) ; } for ( int i = size + 1 ; i < queue . length ; ++ i ) assertExpr ( queue [ i ] == null ) ; } }
Check invariants of the queue.
Check invariants of the queue .
// parent fires first