You can use java's Collections.binarySearch
for this, since your list is sorted.
In the spec, binary search returns:
the index of the search key, if it is contained in the list;
otherwise, (-(insertion point) - 1). The insertion point is defined as
the point at which the key would be inserted into the list: the index
of the first element greater than the key, or list.size() if all
elements in the list are less than the specified key. Note that this
guarantees that the return value will be >= 0 if and only if the key
is found.
First off, if you binary search and the element is in the list, you'll get a positive value (the index of the element), and can just return that (or if you still want an element that's less you can just walk backwards from there until you find one).
Otherwise, if you search for something that isn't in the list you can work backward from the return value to the index you want. If you search for 500 in your example list, the algorithm would return (-3 - 1) = -4. Thus, you can add 1 to get back to the insertion point (-3), and then multiply by -1 and subtract 1 to get the index BEFORE the first element GREATER than the one you searched for, which will either be an index that meets your 2 criteria OR -1 if all elements in the list are greater than the one you searched for.
The advantage of using binary search over a tree set is that it will likely have less overhead.