Code example for LinkedList

public class MemoryHistory 
    implements History 
    public static final int DEFAULT_MAX_SIZE = 500;
    private final LinkedList<CharSequence> items = new LinkedList<CharSequence>();
    private int maxSize = DEFAULT_MAX_SIZE;
    private boolean ignoreDuplicates = true;
    private boolean autoTrim = false;
    // NOTE: These are all ideas from looking at the Bash man page: 
    // TODO: Add ignore space? (lines starting with a space are ignored) 
    // TODO: Add ignore patterns? 
    // TODO: Add history timestamp?