gumbo.util
Interface SetList

All Superinterfaces:
java.util.Collection, java.util.List
All Known Implementing Classes:
AbstractSetList

public interface SetList
extends java.util.List

An interface for a list whose elements are also a set (unique). See AbstractSetList for details concerning the contract for implementing a SetList.

Version:
$Revision: 1.2 $
Author:
Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.

Method Summary
 java.util.Set asSet()
          Gets a mutable view of this setlist as a set, with a list iterator order.
 void sort()
          Sorts this list into ascending order, according to the natural ordering of its elements.
 void sort(java.util.Comparator c)
          Sorts this list according to the order induced by the specified comparator.
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Method Detail

sort

public void sort(java.util.Comparator c)
Sorts this list according to the order induced by the specified comparator. (Collections.sort() can't be used because a SetList does not allow duplicates.)


sort

public void sort()
Sorts this list into ascending order, according to the natural ordering of its elements. (Collections.sort() can't be used because a SetList does not allow duplicates.)


asSet

public java.util.Set asSet()
Gets a mutable view of this setlist as a set, with a list iterator order.

Returns:
The view (Object). Never null.