|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Holds a collection of unique RowLink
objects.
The set is understood to be mutable - that is the methods
(including iterator().remove()
should not throw
UnsupportedOperationException
s.
Although its methods are very similar to those of a
Set
, this is not a Set
implementation.
This is because it will have a pretty specialised use - in particular
you should usually treat it as though it may contain a very large
number of elements and hence think carefully about efficiency
of access methods rather than take advantage of the convenience
methods available in the Collections package.
Method Summary | |
void |
addLink(RowLink link)
Adds a new link to this set. |
boolean |
containsLink(RowLink link)
Indicates whether this set contains a given link. |
Iterator |
iterator()
Returns an iterator over the elements of this set. |
boolean |
removeLink(RowLink link)
Removes an existing link from this set. |
int |
size()
Returns the number of items in this set. |
boolean |
sort()
Requests that the set become sorted. |
Method Detail |
public void addLink(RowLink link)
link
(by equals
)
they should be removed.
link
- row link to addpublic boolean containsLink(RowLink link)
link
- link to test
link
public boolean removeLink(RowLink link)
link
- link to remove
link
was there in the first placepublic Iterator iterator()
remove()
methodpublic int size()
public boolean sort()
iterator()
method should return an iterator which
iterates over the entries in their natural
(Comparator
) order.
If an implementation is not capable of this action though, it
may just return false and do nothing.
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |