Find this bookmark in one of the lists.
@return int index in table; or -1 if not found.
@param bookmark java.lang.Object The bookmark to look for.
@param iHandleType The type of bookmark to look for.
489047
public int findElement(Object bookmark, int iHandleType)
    {
        if (bookmark == null)
            return -1;
        int iTargetPosition = m_gridBuffer.findElement(bookmark, iHandleType);
        if (iTargetPosition == -1)
            iTargetPosition = m_gridList.findElement(bookmark, iHandleType);
        return iTargetPosition;   // Not found
    }
1131957
public static int indexOf(List<Node> list , int value ) {

		for (int i = 0; i < list.size(); i++) {
			if( list.get(i).which == value )
				return i;
		}

		return -1;
	}
176253
public static int getPositionByIdentifier(DrawerBuilder drawer, long identifier) {
        if (identifier != -1) {
            for (int i = 0; i < drawer.getAdapter().getItemCount(); i++) {
                if (drawer.getAdapter().getItem(i).getIdentifier() == identifier) {
                    return i;
                }
            }
        }

        return -1;
    }
1165015
public int getIndex(String feature)
	{
		//logger.debug("FeatureIndex.get : " + feature + "(" + count + ")");
		Integer index = (Integer) map.get(feature);

		if (index == null)
			return -1;

		return index.intValue();
	}
223890
String getColRemarks(int i) {

        String key;

        if (table.getTableType() != TableBase.SYSTEM_TABLE) {
            return null;
        }

        key = getName() + "_" + getColName(i);

        return BundleHandler.getString(hnd_column_remarks, key);
    }
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;
    }
979010
protected static int containsIndex(int[] is, int i) {
    for(int j = 0; j < is.length; j++) {
      if(i == is[j]) {
        return j;
      }
    }
    return -1;
  }
1362009
public static int cardinality(SkippableIterator i) {
		int card = 0;
		while (i.hasValue()) {
			card += Integer.bitCount(i.getCurrentWord());
			i.advance();
		}
		return card;
	}
737004
public FieldList setHandle(Object bookmark, int iHandleType) throws DBException
    {
        m_objectID = null;      // No current record
        m_dataSource = null;
        FieldList fieldList = this.getNextTable().setHandle(bookmark, iHandleType);
        if (fieldList != null)
            m_iRecordStatus = DBConstants.RECORD_NORMAL;
        else
            m_iRecordStatus = DBConstants.RECORD_INVALID | DBConstants.RECORD_AT_BOF | DBConstants.RECORD_AT_EOF;
        return fieldList;
    }
507199
private int lowestNonNullIndex(int iTargetPosition)
    {
        Object bookmark = null;
        int iBookmarkIndex = iTargetPosition;
        while (bookmark == null)
        {
            int iArrayIndex = m_gridList.listToArrayIndex(iBookmarkIndex);
            iBookmarkIndex =  m_gridList.arrayToListIndex(iArrayIndex);   // Lowest valid bookmark
            bookmark = m_gridList.elementAt(iBookmarkIndex);
            if (bookmark == null)
            {
                if (iBookmarkIndex == 0)
                    return -1;  // None found
                iBookmarkIndex--;
                if (m_gridBuffer != null)
                    bookmark = m_gridBuffer.elementAt(iBookmarkIndex);  // Check to see if it's in this list
            }
        }
        return iBookmarkIndex;  // Valid bookmark, return it.
    }
1078274
public int getCostRateTableIndex()
   {
      Integer value = (Integer) getCachedValue(AssignmentField.COST_RATE_TABLE);
      return value == null ? 0 : value.intValue();
   }
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)));}
1281539
public int bookmarkToIndex(Object bookmark, int iHandleType)
    {
        DataRecord thisBookmark = null;
        if (bookmark == null)
            return -1;
        for (int iTargetPosition = m_iCurrentRecordStart; iTargetPosition < m_iCurrentRecordEnd; iTargetPosition++)
        {
            thisBookmark = (DataRecord)this.elementAt(iTargetPosition);
            if (thisBookmark != null)
                if (bookmark.equals(thisBookmark.getHandle(iHandleType)))
                    return iTargetPosition;
        }
//+ Still not found, do a binary search through the recordlist for a matching key
        return -1;  // Not found
    }
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);
        }
    }
137121
public int indexOf(final OIdentifiable iElement) {
		if (delegate.isEmpty())
			return -1;

		final boolean prevConvert = delegate.isAutoConvertToRecord();
		if (prevConvert)
			delegate.setAutoConvertToRecord(false);

		final int pos = Collections.binarySearch(delegate, iElement);

		if (prevConvert)
			// RESET PREVIOUS SETTINGS
			delegate.setAutoConvertToRecord(true);

		return pos;
	}
998880
public int getEvictionIndex() {
    /*
     * If the table has been shrunk then it's possible for the clock-hand to
     * point past the end of the table.  We cannot allow the initial-hand to
     * be equal to this otherwise we may never be able to terminate this loop.
     */
    if (clockHand >= hashtable.capacity()) {
      clockHand = 0;
    }

    int initialHand = clockHand;
    int loops = 0;
    while (true) {
      if ((clockHand += ENTRY_SIZE) + STATUS >= hashtable.capacity()) {
        clockHand = 0;
      }

      int hand = hashtable.get(clockHand + STATUS);

      if (evictable(hand) && ((hand & PRESENT_CLOCK) == 0)) {
        return clockHand;
      } else if ((hand & PRESENT_CLOCK) == PRESENT_CLOCK) {
        hashtable.put(clockHand + STATUS, hand & ~PRESENT_CLOCK);
      }

      if (initialHand == clockHand && ++loops == 2) {
        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;
  }