Code example for LinkedList

Methods: isEmpty

0
    public int size() { 
        return items.size();
    } 
 
    public boolean isEmpty() { 
        return items.isEmpty();
    } 
 
    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);
    }