private final int binarySearch(final int[] indexes, final int len,
			final int val, final Comparator<? super Attribute> comp) {
		int left = 0, mid = 0, right = len - 1, cmp = 0;
		final Attribute base = attributeData[val];
		while (left <= right) {
			mid = (left + right) >>> 1;
			cmp = comp.compare(base, attributeData[indexes[mid]]);
			if (cmp == 0) {
				while (cmp == 0 && mid < right && comp.compare(
						base, attributeData[indexes[mid + 1]]) == 0) {
					mid++;
				}
				return mid + 1;
			} else if (cmp < 0) {
				right = mid - 1;
			} else {
				left = mid + 1;
			}
		}
		return left;
	}