public int findElement ( Object bookmark , int iHandleType ) { int iTargetPosition ; Object thisBookmark = null ; if ( bookmark == null ) return - 1 ; //+ Not found, look through the recordlist boolean bDataRecordFormat = false ; for ( iTargetPosition = 0 ; iTargetPosition < m_iRecordListEnd ; iTargetPosition += m_iRecordListStep ) { thisBookmark = this . elementAt ( iTargetPosition ) ; if ( iTargetPosition == 0 ) if ( thisBookmark instanceof DataRecord ) bDataRecordFormat = true ; if ( bookmark . equals ( thisBookmark ) ) return iTargetPosition ; else if ( bDataRecordFormat ) if ( bookmark . equals ( ( ( DataRecord ) thisBookmark ) . getHandle ( iHandleType ) ) ) return iTargetPosition ; } //+ Still not found, do a binary search through the recordlist for a matching key return - 1 ; // Not found }
Search through this list for this bookmark .