|
CLRA 0.1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.clra.web.BoatSet
A collection of "finder" methods that return read-only, sorted sets of CLRA boats.
FIXME: when this class changes to a "Session-like" design, make sure it becomes Serializable.
| Method Summary | |
boolean |
add(Object o)
|
boolean |
addAll(Collection c)
|
void |
clear()
|
Comparator |
comparator()
Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering. |
boolean |
contains(Object o)
Returns true if this set contains the specified element. |
boolean |
containsAll(Collection c)
Returns true if this set contains all of the elements of the specified collection. |
boolean |
equals(Object o)
Compares the specified object with this set for equality. |
static BoatSet |
findAllActiveBoats()
Finds all active boats of the CLRA. |
static BoatView |
findBoatById(int id)
Finds the boat that has the given id. |
static BoatView |
findBoatByName(String name)
Finds the boat that has the given name. |
Object |
first()
Returns the first (lowest) element currently in this sorted set. |
int |
hashCode()
Returns the hash code value for this set. |
SortedSet |
headSet(Object toElement)
Returns a view of the portion of this sorted set whose elements are strictly less than toElement. |
boolean |
isEmpty()
Returns true if this set contains no elements. |
Iterator |
iterator()
Returns an iterator over the (sorted) elements in this set. |
Object |
last()
Returns the last (highest) element currently in this sorted set. |
boolean |
remove(Object o)
|
boolean |
removeAll(Collection c)
|
boolean |
retainAll(Collection c)
|
int |
size()
Returns the number of elements in this set (its cardinality). |
SortedSet |
subSet(Object fromElement,
Object toElement)
Returns a view of the portion of this sorted set whose elements range from fromElement, inclusive, to toElement, exclusive. |
SortedSet |
tailSet(Object fromElement)
Returns a view of the portion of this sorted set whose elements are greater than or equal to fromElement. |
Object[] |
toArray()
Returns an array containing all of the elements in this set. |
Object[] |
toArray(Object[] a)
Returns an array containing all of the elements in this set whose runtime type is that of the specified array. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static BoatSet findAllActiveBoats()
throws WebException
public static BoatView findBoatById(int id)
throws WebException
public static BoatView findBoatByName(String name)
throws WebException
public Comparator comparator()
comparator in interface SortedSet
public SortedSet subSet(Object fromElement,
Object toElement)
subSet in interface SortedSetfromElement - low endpoint (inclusive) of the subSet.toElement - high endpoint (exclusive) of the subSet.ClassCastException - if fromElement and
toElement are not Boat objects.IllegalArgumentException - if fromElement is greater than
toElement; or if this set is itself a subSet, headSet,
or tailSet, and fromElement or toElement are
not within the specified range of the subSet, headSet, or
tailSet.NullPointerException - if fromElement or
toElement is nullpublic SortedSet headSet(Object toElement)
headSet in interface SortedSettoElement - high endpoint (exclusive) of the headSet.ClassCastException - if toElement is not compatible
with this set's comparator (or, if the set has no comparator,
if toElement does not implement Comparable).NullPointerException - if toElement is nullIllegalArgumentException - if this set is itself a subSet,
headSet, or tailSet, and toElement is not within the
specified range of the subSet, headSet, or tailSet.public SortedSet tailSet(Object fromElement)
tailSet in interface SortedSetfromElement - low endpoint (inclusive) of the tailSet.ClassCastException - if fromElement is not compatible
with this set's comparator (or, if the set has no comparator,
if fromElement does not implement Comparable).NullPointerException - if fromElement is nullIllegalArgumentException - if this set is itself a subSet,
headSet, or tailSet, and fromElement is not within the
specified range of the subSet, headSet, or tailSet.public Object first()
first in interface SortedSetNoSuchElementException - sorted set is empty.public Object last()
last in interface SortedSetNoSuchElementException - sorted set is empty.public int size()
size in interface Setpublic boolean isEmpty()
isEmpty in interface Setpublic boolean contains(Object o)
contains in interface Seto - element whose presence in this set is to be tested.public Iterator iterator()
iterator in interface Setpublic Object[] toArray()
toArray in interface Setpublic Object[] toArray(Object[] a)
toArray in interface Seta - the array into which the elements of this set are to
be stored, if it is big enough; otherwise, a new array of the
same runtime type is allocated for this purpose.ArrayStoreException - the runtime type of a is not a supertype
of the runtime type of Boat.public boolean containsAll(Collection c)
containsAll in interface Setc - collection to be checked for containment in this set.public boolean equals(Object o)
equals in interface Setequals in class Objecto - Object to be compared for equality with this set.public int hashCode()
hashCode in interface SethashCode in class Objectpublic boolean add(Object o)
add in interface SetUnsupportedOperationException - since the add method is
not supported by this set.public boolean remove(Object o)
remove in interface SetUnsupportedOperationException - since the remove method is
not supported by this set.public boolean addAll(Collection c)
addAll in interface SetUnsupportedOperationException - since the addAll method is
not supported by this set.public boolean retainAll(Collection c)
retainAll in interface SetUnsupportedOperationException - since the retainAll method
is not supported by this Collection.public boolean removeAll(Collection c)
removeAll in interface SetUnsupportedOperationException - since the removeAll
method is not supported by this Collection.public void clear()
clear in interface SetUnsupportedOperationException - since the clear method
is not supported by this set.
|
CLRA 0.1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||