Search for the value in the sorted int array and return the index.

@param intArray array that we are searching in.
@param value value that is being searched in the array.

@return the index where the value is found in the array, else -1.
327265
public static int search(int[] intArray, int value) { 
        int start = 0;
        int end = intArray.length - 1;
        int middle = 0;
        
        while(start <= end) {
            middle = (start + end) >> 1;
        
            if(value == intArray[middle]) {
                return middle;
            }
            
            if(value < intArray[middle]) {
                end = middle - 1 ;
            }
            else {
                start = middle + 1;
            }
        }
                

        return -1;
    }
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;
	}
955314
def findValue(value)
      if ! @sorted
        @map.sort{ |a,b| a[0] <=> b[0] }
        @sorted = true
      end
      
      @map.binsearch{|x| x[0] >= value}[1]
    end
832057
public int lookupIndex(float value, float delta) {
        for (int i=0; i<size; i++) {
            if (Primitives.equals(elements[i + start], value, delta)) {
                return i;
            }
        }
        return -1;
    }
373096
public static int search(char[] charArray, char value) { 
        int start = 0;
        int end = charArray.length - 1;
        int middle = 0;
        
        while(start <= end) {
            middle = (start + end) >> 1;
        
            if(value == charArray[middle]) {
                return middle;
            }
            
            if(value < charArray[middle]) {
                end = middle - 1 ;
            }
            else {
                start = middle + 1;
            }
        }
                

        return -1;
    }
180053
public static <T> int indexOf(T[] array, T value) {
        for (int i = 0; i < array.length; i++) {
            if (array[i] == null) {
                if (value == null) return i;
            } else {
                if (value != null && array[i].equals(value)) return i;
            }
        }
        return -1;
    }
244377
public static int search(short[] shortArray, short value) { 
        int start = 0;
        int end = shortArray.length - 1;
        int middle = 0;
        
        while(start <= end) {
            middle = (start + end) >> 1;
        
            if(value == shortArray[middle]) {
                return middle;
            }
            
            if(value < shortArray[middle]) {
                end = middle - 1 ;
            }
            else {
                start = middle + 1;
            }
        }
                

        return -1;
    }
459343
public static int searchDescending(long[] longArray, long value) { 
        int start = 0;
        int end = longArray.length - 1;
        int middle = 0;
        
        while(start <= end) {
            middle = (start + end) >> 1;
        
            if(value == longArray[middle]) {
                return middle;
            }
            
            if(value > longArray[middle]) {
                end = middle - 1 ;
            }
            else {
                start = middle + 1;
            }
        }
                

        return -1;
    }
1024328
public static int searchDescending(double[] doubleArray, double value) { 
        int start = 0;
        int end = doubleArray.length - 1;
        int middle = 0;
        
        while(start <= end) {
            middle = (start + end) >> 1;
        
            if(value == doubleArray[middle]) {
                return middle;
            }
            
            if(value > doubleArray[middle]) {
                end = middle - 1 ;
            }
            else {
                start = middle + 1;
            }
        }
                

        return -1;
    }
145174
public static int listFind(String list, String value, String delimiter) {
	Array arr = listToArrayTrim(list, delimiter);
	int len = arr.size();
	for (int i = 1; i <= len; i++) {
	    if (arr.get(i, "").equals(value)) return i - 1;
	}

	return -1;
    }
605991
public static int search(double[] doubleArray, double value) { 
        int start = 0;
        int end = doubleArray.length - 1;
        int middle = 0;
        
        while(start <= end) {
            middle = (start + end) >> 1;
        
            if(value == doubleArray[middle]) {
                return middle;
            }
            
            if(value < doubleArray[middle]) {
                end = middle - 1 ;
            }
            else {
                start = middle + 1;
            }
        }
                

        return -1;
    }
223938
public static int indexOfIgnoreCase(CharSequence[] array, CharSequence value) {
		if (null != array) {
			for (int i = 0; i < array.length; i++) {
				if (StrUtil.equalsIgnoreCase(array[i], value)) {
					return i;
				}
			}
		}
		return INDEX_NOT_FOUND;
	}
1013800
private static int search(int value, int[] array, int start, int length)
    {
        int power = 1 << getHighBit(length);
        int extra = length - power;
        int probe = power;
        int index = start;

        if (value >= array[index + extra]) {
            index += extra;
        }

        while (probe > 1) {
            probe >>= 1;

            if (value >= array[index + probe]) {
                index += probe;
            }
        }

        return index;
    }
850405
public static <E extends Comparable<E>> void sort(E[] intArray) {
        Quicksort.sort(intArray, 0, intArray.length - 1 , false);
    }
1190912
protected int binarySearch(int value) {
		int left = 0;
		int right = size-1;
		while(left <= right) {
			int mid = (left + right)>>1;
			int midValue = elementData[mid];
			if(value==midValue) return mid;
			if(value<midValue) right = mid-1;
			else left = mid+1;
		}
		return -(left+1);
	}
345899
public static void intIndexesToBooleanArray(int[] arra, boolean[] arrb) {

        for (int i = 0; i < arra.length; i++) {
            if (arra[i] < arrb.length) {
                arrb[arra[i]] = true;
            }
        }
    }
58238
public static <T> int indexOf(T[] array, Object value) {
		if (null != array) {
			for (int i = 0; i < array.length; i++) {
				if (ObjectUtil.equal(value, array[i])) {
					return i;
				}
			}
		}
		return INDEX_NOT_FOUND;
	}