Searches this list for {@code object} and returns the index of the first
occurrence that is at or after {@code from}.

@return the index or -1 if the object was not found.
431301
public int indexOf(E object, int from) {
        Object[] snapshot = elements;
        return indexOf(object, snapshot, from, snapshot.length);
    }
911778
public int compareTo(Point<E> obj) {
    if (obj == null)
      return -1; 
    
    if (dimensions() != obj.dimensions())
      return -1; 
    
    for (int i = 0; i < dimensions(); i++) {
      if (getValue(i).getClass() != obj.getValue(i).getClass())
        return -1;

      if (getValue(i) instanceof Double) {
        if (Utils.sm((Double) getValue(i), (Double) obj.getValue(i))) {
	  return -1;
	} else if (Utils.gr((Double) getValue(i), (Double) obj.getValue(i))) {
	  return 1;
	}
      } else {
        int r = getValue(i).toString().compareTo(obj.getValue(i).toString());
	if (r != 0) {
	  return r;
	}
      }
    }
    
    return 0;
  }
689481
public int getIndex(Object key) {
    Integer i = (Integer) nset.get(key);
    if (i == null) {
      return -1;
    }
    else {
      return i.intValue();
    }
  }
779769
static int indexOfImpl(List<?> list, @Nullable Object element) {
    ListIterator<?> listIterator = list.listIterator();
    while (listIterator.hasNext()) {
      if (Objects.equal(element, listIterator.next())) {
        return listIterator.previousIndex();
      }
    }
    return -1;
  }
506304
@Override
    public int first() {
        fCachedBreakPositions = null;
        fDictionaryCharCount = 0;
        fPositionInCache = 0;
        fLastRuleStatusIndex  = 0;
        fLastStatusIndexValid = true;
        if (fText == null) {
            return BreakIterator.DONE;
        }
        fText.first();
        return fText.getIndex();
    }
1051281
public int nextIndex() {
		int index = -1;
		for (int i = 0; i <  _values.length && index == -1; ++i) {
			if (Double.isNaN(_values[i])) {
				index = i;
			}
		}

		return index;
	}
194740
public int indexOf(Object o) {
		try {
			for (int i = 0; i < events.size(); i++) {
				if (events.get(i).equals(o)) {
					return i;
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
		return -1;
	}
333445
public int firstIndexOf(String name) {
    Integer index =
        (Strings.isDoubleQuoted(name))
            ? byCaseSensitiveName.get(Strings.unDoubleQuote(name))
            : byCaseInsensitiveName.get(name.toLowerCase());
    return (index == null) ? -1 : index;
  }
445511
@SuppressWarnings("unchecked")
public int compareTo(Object object)
   {
      if(!(object instanceof Subject))
         return -1;
      
      Subject<T> subject = (Subject<T>)object;
      
      return this.name.compareTo(subject.getName());
   }
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;
	}
665460
public T getFirst() {
        Optional<Rsp<T>> retval=values().stream().filter(rsp -> rsp.getValue() != null).findFirst();
        return retval.isPresent()? retval.get().getValue() : null;
    }
866228
@Override
    public int classIndex() {
        int classIndex = instanceHeader.classIndex();
       // return  ? classIndex : 0;
        if(classIndex == Integer.MAX_VALUE)
        	if(this.instanceHeader.instanceInformation.range!=null)
        		classIndex=instanceHeader.instanceInformation.range.getStart();
        	else
        		classIndex=0;
        return classIndex;
    }
673122
@Override
    public int indexOf(Object o) {
        if (displacement != null) {
            return super.indexOf(o) + displacement;
        }
        return super.indexOf(o);
    }
903519
static <V> int find(Comparator<V> comparator, Object key, Object[] a, final int fromIndex, final int toIndex)
    {
        int low = fromIndex;
        int high = toIndex - 1;

        while (low <= high)
        {
            int mid = (low + high) / 2;
            int cmp = comparator.compare((V) key, (V) a[mid]);

            if (cmp > 0)
                low = mid + 1;
            else if (cmp < 0)
                high = mid - 1;
            else
                return mid; // key found
        }
        return -(low + 1);  // key not found.
    }
1361162
function getIndex(objects, obj) {

            var i;
            for (i = 0; i < objects.length; i++) {
                if (objects[i] === obj) {
                    return i;
                }
            }

            return -1;
        }
1118340
public Object get(int index)
    {
        if ((index - m_iStartIndex < 0) || (index - m_iStartIndex >= this.size()))
            return null;    // Not in current list
        return super.get(index - m_iStartIndex);
    }
1131885
public static Object getFirstValue(final Object iObject) {
    if (iObject == null)
      return null;

    if (!isMultiValue(iObject))
      return null;

    try {
      if (iObject instanceof Collection<?>)
        return ((Collection<Object>) iObject).iterator().next();
      else if (iObject instanceof Map<?, ?>)
        return ((Map<?, Object>) iObject).values().iterator().next();
      else if (iObject.getClass().isArray())
        return Array.get(iObject, 0);
    } catch (Exception e) {
      // IGNORE IT
      OLogManager.instance().debug(iObject, "Error on reading the first item of the Multi-value field '%s'", iObject);
    }

    return null;
  }