/** *
An interface representing an ordered set of objects of type
* E
, where E
implements the
* Comparable
interface. That is, elements stored in the
* SimpleSSet
can be compared to each other using the a
* compareTo
. This comparison induces a total
* order <
on the elements stored in the set:
* for every pair of distinct elements in the set x, y
,
* we have either x < y
(indicated by
* x.compareTo(y) < 0
) or y < x
* (indicated by x.compareTo(y) > 0
). In addition to
* the functionality provided by SimpleUSet
,
* SimpleSSet
provides access to the smallest and largest
* elements contained in the set according to the natural ordering on
* E
. Further, the find
method differs for
* SimpleSSet
(see below).
Return the smallest element y
in the set that
* is larger than or equal to x
in the natural
* ordering for E
, or returns null
if no
* such y
is stored in the set. Note that this
* behavior differs from the behavior of find
for
* SimpleUSet
.
y
in the set that is
* greater than or equal to x
in the natural ordering
* on E
, if such an element extists, and
* null
otherwise
*/
@Override
E find(E x);
/**
* Find and return the smallest element in the set under the
* natural ordering defined on E
, or
* null
if the set is empty.
E
, or null
if the
* set is empty.
*/
E findMin();
/**
* Find and return the largest element in the set under the
* natural ordering defined on E
, or
* null
if the set is empty.
E
, or null
if the
* set is empty.
*/
E findMax();
}