public boolean contains(E e) {
		int left = 0;
		int right = size;
		int mid = (left + right) / 2;
		while (left <= right && mid < size) {
			E selected = (E) elements[mid];
			if (selected.equals(e))
				return true;
			else if (e.compareTo(selected) < 0) {
				right = mid - 1;
			} else {
				left = mid + 1;
			}
			mid = (left + right) / 2;
		}
		return false;
	}