|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DisplayableSortedSet<E>
A DisplayableSortedSet encapsulates a SortedSet and allows it to be displayed by a JList
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface displayablecollections.DisplayableCollection |
---|
DisplayableCollection.CollectionChangedNotification<E> |
Method Summary | |
---|---|
java.util.SortedSet<E> |
headSet(E toElement)
Returns a view of the portion of this sorted set whose elements are strictly less than toElement. |
javax.swing.ListModel |
orderedListModel()
Create a list model for displaying this collection in a JList. |
java.util.SortedSet<E> |
subSet(E fromElement,
E toElement)
Returns a view of the portion of this sorted set whose elements range from fromElement, inclusive, to toElement, exclusive. |
java.util.SortedSet<E> |
tailSet(E fromElement)
Returns a view of the portion of this sorted set whose elements are greater than or equal to fromElement. |
Methods inherited from interface displayablecollections.DisplayableCollection |
---|
addObserver, deleteObservers, listModel |
Methods inherited from interface java.util.SortedSet |
---|
comparator, first, last |
Methods inherited from interface java.util.Set |
---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Method Detail |
---|
javax.swing.ListModel orderedListModel()
toString()
is what will actually be
displayed for each. The display will show the elements in the same
order as they appear in in the set.
java.util.SortedSet<E> headSet(E toElement)
headSet
in interface java.util.SortedSet<E>
toElement
- - high endpoint (exclusive) of the headSet.
java.lang.ClassCastException
- - if toElement is not compatible with this
set's comparator (or, if the set has no comparator, if toElement
does not implement Comparable). Implementations may, but are
not required to, throw this exception if toElement cannot be
compared to elements currently in the set.
java.lang.NullPointerException
- - if toElement is null and the encapsulated
sorted set does not tolerate null elements.java.util.SortedSet<E> subSet(E fromElement, E toElement)
subSet
in interface java.util.SortedSet<E>
fromElement
- - low endpoint (inclusive) of the subSet.toElement
- - high endpoint (exclusive) of the subSeet.
java.lang.ClassCastException
- - if fromElement and toElement cannot be
compared to one another using this set's comparator (or, if
the set has no comparator, using natural ordering).
Implementations may, but are not required to, throw this
exception if fromElement or toElement cannot be compared to
elements currently in the set.
java.lang.IllegalArgumentException
- if fromElement is greater than
toElement
java.lang.NullPointerException
- - if fromElement or toElement is null
and the encapsulated sorted set does not tolerate null elementsjava.util.SortedSet<E> tailSet(E fromElement)
tailSet
in interface java.util.SortedSet<E>
fromElement
- - low endpoint (inclusive) of the tailSet.
java.lang.ClassCastException
- - if fromElement is not compatible with this
set's comparator (or, if the seet has no comparator, if
fromElement does not implement Comparable). Implementations
may, but are not required to, throw this exception if
fromElement cannot be compared to elements currently in the set.
java.lang.NullPointerException
- - if fromElement is null and the
encapsulated sorted set does not tolerate null elements.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |