Code example for ArrayList

Methods: get, isEmpty, size

0
            overhead = System.currentTimeMillis() - startAt - sleep;
        } 
    } 
 
    public synchronized int getDuration() { 
         if ((mAllEntries != null) && !mAllEntries.isEmpty()) {
             return (int) mAllEntries.get(mAllEntries.size() - 1).mOffsetTime * 1000;
         } 
         return 0; 
    } 
 
    public synchronized int getCurrentPosition() { 
        return (int) mCurrentTime;
    } 
 
    private synchronized void endActiveElements() { 
        for (int i = mActiveElements.size() - 1; i >= 0; i--) {
            ElementTime element = mActiveElements.get(i);
            if (LOCAL_LOGV) {
                Log.v(TAG, "[STOP]  " + " at " + mCurrentTime
                        + " " + element);