Code example for LinkedList

Methods: get

0
        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();
        } 
 
        if (isIgnoreDuplicates()) { 
            if (!items.isEmpty() && item.equals(items.getLast())) {
                return; 
            } 
        }