Logo Search packages:      
Sourcecode: wims version File versions  Download package

Object rene::util::MyVector::elementAt ( int  n  )  [inline]

Get the element at a given position. Second access will always be effective. First access compresses. Throws an exception, if the index is invalid.

Definition at line 169 of file MyVector.java.

Referenced by rene::dialogs::MyFileDialog::addUndo(), rene::dialogs::MyFileDialog::getUndo(), rene::zirkel::ZirkelCanvas::select(), rene::zirkel::ZirkelCanvas::selectCreatePoint(), rene::zirkel::dialogs::SelectDialog::SelectDialog(), rene::zirkel::ZirkelCanvas::selectImmediateMoveableObject(), rene::zirkel::ZirkelCanvas::selectImmediateMoveablePoint(), rene::zirkel::ZirkelCanvas::selectMoveableObject(), rene::zirkel::ZirkelCanvas::selectMoveablePoint(), and rene::zirkel::ZirkelCanvas::selectWithSelector().

      {     if (n<0 || n>=ON)
                  throw new ArrayIndexOutOfBoundsException(n);
            if (Gap<0 || n<Gap) return O[n];
            int k=Gap;
            for (int i=Gap; i<OLast; i++)
            {     if (O[i]==null) continue;
                  O[k]=O[i]; O[i]=null;
                  if (k==n)
                  {     Object ret=O[k];
                        k++; Gap=k;
                        if (Gap>=ON)
                        {     for (int j=Gap; j<OLast; j++) O[j]=null;
                              OLast=ON; Gap=-1;
                        return ret;
            // never happens
            throw new ArrayIndexOutOfBoundsException(n); 

Generated by  Doxygen 1.6.0   Back to index