Code example for CopyOnWriteArrayList

Methods: get, size

0
    public int getIndexOf(Tab tab) {
        return mOrder.lastIndexOf(tab);
    } 
 
    public Tab getTabAt(int index) {
        if (index >= 0 && index < mOrder.size())
            return mOrder.get(index);
        else 
            return null; 
    } 
 
    public Tab getSelectedTab() { 
        return mSelectedTab;
    } 
 
    public boolean isSelectedTab(Tab tab) {
        if (mSelectedTab == null)
            return false; 
 
        return tab == mSelectedTab;
    }