public List < Item > getQueuedItems ( ) { LinkedList < Item > list = new LinkedList <> ( ) ; for ( Item item : Jenkins . getInstance ( ) . getQueue ( ) . getItems ( ) ) { if ( item . task == owner ) { list . addFirst ( item ) ; } } return list ; }
Returns the queue item if the owner is scheduled for execution in the queue in REVERSE ORDER