has method
Implementation
bool has(E input) {
if (comparator(lower, upper) == 0) return lower == input;
if (isAscending) {
return comparator(input, lower) >= 0 && comparator(input, upper) < 0;
} else {
return comparator(input, upper) >= 0 && comparator(input, lower) < 0;
}
}