Code example for Vector

Methods: elementAt, size

0
    int arrayOffset = idx - (arrayIndx * m_minArraySize);
 
    // 
    // If the array has been off loaded to the Vector Storage them 
    // grab it from there. 
    if (arrayIndx < m_Arrays.size())
    { 
      _ObjectArray a = (_ObjectArray)m_Arrays.elementAt(arrayIndx);
      return a.objects[arrayOffset];
    } 
    else 
    { 
      // We must be in the current array, so pull it from there 
 
      // %REVIEW% We may want to check to see if arrayIndx is only 
      // one freater that the m_Arrays.size(); This code is safe but 
      // will repete if the index is greater than the array size. 
      return m_currentArray.objects[arrayOffset];
    } 
  }