public interface SortedListInterface> { /** * Add an element to the sorted array list * @param obToAdd -- the thing to be added * @return */ public boolean add(B obToAdd); /** * Remove the first (or only) occurrence of the specified item * from the sorted list. Comparisons are done using * compareTo(x)==0 rather than == or equals. Note that * because comparison are done using compareTo, it may be the * case that that the returned object is NOT == to the provided * object. * @param b the item to be removed * @return the removed item */ public B remove(B b); /** * Get the position of the an item in the sorted list. This is * is the first item found. Comparisons are done using * compareTo(x)==0 rather than == or equals. * @param b the item whose position is to be found * @return the position or -1 if could not be found. */ public int getPosition(B b); }