public List < T > values ( ) { List < T > result = new ArrayList < T > ( ) ; for ( Iterator < T > itr = iterator ( ) ; itr . hasNext ( ) ; ) { result . add ( itr . next ( ) ) ; } return result ; }
Returns a list containing all values from this queue in the sequence they were added .