public synchronized T pop ( ) { if ( list . isEmpty ( ) ) { return factory . newInstance ( ) ; } else { return list . remove ( list . size ( ) - 1 ) ; } }
Returns an instance . If there are instances queued up internally one of those is returned . Otherwise a new instance is created .