Search through this list for this bookmark.
@return int index in table; or -1 if not found.
@param bookmark java.lang.Object The bookmark to search for.
@param iHandleType The type of bookmark passed.
481179
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
    }
154045
function getIndexOfType(element) {
  let index = 0;
  let child;
  while ((child = element.previousElementSibling)) {
    if (child.tagName === element.tagName) {
      index++;
    }
  }
  return index;
}
1009050
public PubType getPubTypeList(int i) {
    if (Header_Type.featOkTst && ((Header_Type)jcasType).casFeat_pubTypeList == null)
      jcasType.jcas.throwFeatMissing("pubTypeList", "de.julielab.jules.types.Header");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_pubTypeList), i);
    return (PubType)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Header_Type)jcasType).casFeatCode_pubTypeList), i)));}
163819
public Object elementAt(int iTargetPosition)
    {
        Object bookmark = null;
        if (this.inBufferArray(iTargetPosition))
            bookmark = m_aCurrentRecord[this.bufferToArrayIndex(iTargetPosition)];
        if (bookmark == gEmptyCell)
            bookmark = null;
        return bookmark;
    }
453848
public Object getBookmark(int iHandleType)
    {
        Map<String,Object> properties = this.getProperties();
        Object bookmark = properties.get(BOOKMARK);
        if (iHandleType == DBConstants.BOOKMARK_HANDLE)
            return bookmark;
        if (iHandleType == DBConstants.FULL_OBJECT_HANDLE)
        {
            String strDatabaseName = (String)properties.get(DB_NAME);
            String strTableName = (String)properties.get(TABLE_NAME);
            // Must match the FULL_OBJECT_HANDLE format!
            String strSource = m_strSourceType + BaseTable.HANDLE_SEPARATOR + strDatabaseName + BaseTable.HANDLE_SEPARATOR + strTableName;
            strSource += BaseTable.HANDLE_SEPARATOR + bookmark.toString();
            return strSource;
        }
        return null;
    }
362062
public int findElement(Object bookmark, int iHandleType)
    {
        int iTargetPosition;
        Object thisBookmark = null;
        if (bookmark == null)
            return -1;
        boolean bDataRecordFormat = false;
        for (iTargetPosition = m_iCurrentRecordStart; iTargetPosition < m_iCurrentRecordEnd; iTargetPosition++)
        {
            thisBookmark = this.elementAt(iTargetPosition);
            if (iTargetPosition == m_iCurrentRecordStart)
                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
    }
873756
public ResourceEntry getResourceEntryList(int i) {
    if (ConceptMention_Type.featOkTst && ((ConceptMention_Type)jcasType).casFeat_resourceEntryList == null)
      jcasType.jcas.throwFeatMissing("resourceEntryList", "de.julielab.jules.types.ConceptMention");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((ConceptMention_Type)jcasType).casFeatCode_resourceEntryList), i);
    return (ResourceEntry)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((ConceptMention_Type)jcasType).casFeatCode_resourceEntryList), i)));}
398905
public int getIndex() {
        if (parent != null) {
            for (int i = 0; i < parent.children.size(); i++) {
                if (parent.children.get(i) == this) {
                    return i;
                }
            }
        }
        
        return -1;
    }
236788
private Integer getLookupAttributeIndex(
      EditorAttribute editorAttribute, EditorEntityType editorEntityType) {

    String editorAttributeId = editorAttribute.getId();

    int index =
        editorEntityType
            .getLookupAttributes()
            .stream()
            .map(EditorAttributeIdentifier::getId)
            .collect(toList())
            .indexOf(editorAttributeId);
    return index != -1 ? index : null;
  }
660018
public Object getHandle(int iHandleType) throws DBException
    {
        Object bookmark = null;
        try   {
            if ((iHandleType & DBConstants.OBJECT_SOURCE_HANDLE) == 0)
                iHandleType = DBConstants.BOOKMARK_HANDLE;      // For JDBC, always use bookmark
            bookmark = super.getHandle(iHandleType);
        } catch (DBException ex)    {
            throw ex;
        }
        return bookmark;
    }
25611
public Vector<SessionInfo> getWaitlist(Object bookmark, boolean bCreateIfNotFound)
    {
    	Vector<SessionInfo> vector = m_htWaitLists.get(bookmark);
        if (bCreateIfNotFound)
            if (vector == null)
                m_htWaitLists.put(bookmark, vector = new Vector<SessionInfo>());
        return vector;
    }
41302
int indexOf(ResourcePath key) {
    QueryDocumentSnapshot document = keyIndex.get(key);
    if (document == null) {
      return -1;
    }
    return sortedSet.indexOf(document);
  }
707128
public FieldList setHandle(Object bookmark, int iHandleType) throws DBException
    {
        if (this.doSetHandle(bookmark, iHandleType))
            return this.getRecord();
        else
            return null;
    }
846396
public Object doSetHandle(Object bookmark, int iOpenMode, String strFields, int iHandleType) throws DBException, RemoteException
    {
        synchronized(m_objSync)
        {
            return m_tableRemote.doSetHandle(bookmark, iOpenMode, strFields, iHandleType);
        }
    }
383665
public Object doSetHandle(Object bookmark, int iOpenMode, String strFields, int iHandleType) throws DBException, RemoteException
    {
        return this.seek(null, 0, null, strFields, bookmark);
    }
936944
public Keyword getKeywordList(int i) {
    if (ManualDescriptor_Type.featOkTst && ((ManualDescriptor_Type)jcasType).casFeat_keywordList == null)
      jcasType.jcas.throwFeatMissing("keywordList", "de.julielab.jules.types.pubmed.ManualDescriptor");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((ManualDescriptor_Type)jcasType).casFeatCode_keywordList), i);
    return (Keyword)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((ManualDescriptor_Type)jcasType).casFeatCode_keywordList), i)));}
524428
private static int index(Object o) {
        Integer i = TYPE_INDICES.get(o);
        if (i == null) {
            synchronized (TYPE_INDICES) {
                // check that another thread did not already update the index
                i = TYPE_INDICES.get(o);
                if (i != null)
                    return i;
                else {
                    int j = TYPE_INDICES.size();
                    TYPE_INDICES.put(o, j);
                    TYPES.add(o);
                    return j;
                }
            }
        }
        return i;
    }