Code example for Vector

Methods: elementAt, insertElementAt, remove, size

0
        return false; 
    } 
 
    void enter(String text) {
        current().clearEdited(); 
        if (mEntries.size() >= MAX_ENTRIES) {
            mEntries.remove(0);
        } 
        if (mEntries.size() < 2 ||
            !text.equals(mEntries.elementAt(mEntries.size() - 2).getBase())) {
            mEntries.insertElementAt(new HistoryEntry(text), mEntries.size() - 1);
        } 
        mPos = mEntries.size() - 1;
        notifyChanged(); 
    } 
 
    HistoryEntry current() { 
        return mEntries.elementAt(mPos);
    } 
 
    String getText() {
        return current().getEdited(); 
    }