Public Member Functions | |
boolean | add (Resource o) |
Adds a resource to the list if it is not already there. | |
Resource | at (int index) |
Returns the resource at the given index. | |
void | clear () |
Removes all resources from the list. | |
boolean | contains (Resource o) |
Determines whether the resource list contains the given resource. | |
Resource | first () |
Returns the first (most relevant) resource in the list. | |
Iterator< Resource > | iterator () |
Returns an iterator over the resources in the list, sorted by relevance. | |
Resource | last () |
Returns the last (least relevant) resource in the list. | |
boolean | remove (Resource o) |
Removes the given resource from the list if it exists there. | |
int | size () |
Returns the number of resources in the list. | |
String | toString () |
Returns a string representation of this ResourceList. | |
Private Attributes | |
SortedSet< Resource > | resources |
The resources in the list. | |
Static Private Attributes | |
static final long | serialVersionUID = 8112257147108845110L |
Prevent serialization collisions. | |
Classes | |
class | ResourceListComparator |
A comparator that compares (and sorts) resources within a resource list. More... |
boolean edu.cmu.hcii.calo.model.ResourceList.add | ( | Resource | o | ) |
Adds a resource to the list if it is not already there.
o | the resource to add |
Resource edu.cmu.hcii.calo.model.ResourceList.at | ( | int | index | ) |
Returns the resource at the given index.
index | the index to look up |
index
void edu.cmu.hcii.calo.model.ResourceList.clear | ( | ) |
Removes all resources from the list.
boolean edu.cmu.hcii.calo.model.ResourceList.contains | ( | Resource | o | ) |
Determines whether the resource list contains the given resource.
o | the resource to look for |
Resource edu.cmu.hcii.calo.model.ResourceList.first | ( | ) |
Returns the first (most relevant) resource in the list.
Iterator<Resource> edu.cmu.hcii.calo.model.ResourceList.iterator | ( | ) |
Returns an iterator over the resources in the list, sorted by relevance.
Resource edu.cmu.hcii.calo.model.ResourceList.last | ( | ) |
Returns the last (least relevant) resource in the list.
boolean edu.cmu.hcii.calo.model.ResourceList.remove | ( | Resource | o | ) |
Removes the given resource from the list if it exists there.
o | the resource to remove |
int edu.cmu.hcii.calo.model.ResourceList.size | ( | ) |
Returns the number of resources in the list.
String edu.cmu.hcii.calo.model.ResourceList.toString | ( | ) |
Returns a string representation of this ResourceList.
Useful only for debugging.
final long edu.cmu.hcii.calo.model.ResourceList.serialVersionUID = 8112257147108845110L [static, private] |
Prevent serialization collisions.
SortedSet<Resource> edu.cmu.hcii.calo.model.ResourceList.resources [private] |
The resources in the list.