Code example for LinkedList

Methods: isEmpty, removeFirst

0
			filters = new LinkedList<Filter>(context.getFilters());
			this.context = context;
		} 
		 
		public void doFilter(HttpExchange exchange) throws IOException {
			if (filters.isEmpty()) {
				context.getHandler().handle(exchange);
			} else { 
				filters.removeFirst().doFilter(exchange, this);
			} 
		} 
 
	} 
 
	public abstract void doFilter(HttpExchange exchange, Filter.Chain chain) throws IOException;
	 
}