@ SuppressWarnings ( "UseBulkOperation" ) public List < Query > getCapturedQueries ( ) { // Make a copy so that we aren't affected by changes to the list outside of the // synchronized block ArrayList < Query > retVal = new ArrayList <> ( CAPACITY ) ; myQueries . forEach ( retVal :: add ) ; return Collections . unmodifiableList ( retVal ) ; }
Index 0 is oldest