Code example for LinkedList

Methods: clear

0
    public int index() { 
        return offset + index;
    } 
 
    public void clear() { 
        items.clear();
        offset = 0;
        index = 0;
    } 
 
    public CharSequence get(final int index) {
        return items.get(index - offset);
    } 
 
    public void add(CharSequence item) {
        assert item != null;
 
        if (isAutoTrim()) { 
            item = String.valueOf(item).trim();
        }