Save This Page
Home » openjdk-7 » javax » imageio » spi » [javadoc | source]
javax.imageio.spi
class: PartiallyOrderedSet [javadoc | source]
java.lang.Object
   java.util.AbstractCollection
      java.util.AbstractSet
         javax.imageio.spi.PartiallyOrderedSet

All Implemented Interfaces:
    Set, Collection

A set of Objects with pairwise orderings between them. The iterator method provides the elements in topologically sorted order. Elements participating in a cycle are not returned. Unlike the SortedSet and SortedMap interfaces, which require their elements to implement the Comparable interface, this class receives ordering information via its setOrdering and unsetPreference methods. This difference is due to the fact that the relevant ordering between elements is unlikely to be inherent in the elements themselves; rather, it is set dynamically accoring to application policy. For example, in a service provider registry situation, an application might allow the user to set a preference order for service provider objects supplied by a trusted vendor over those supplied by another.
Constructor:
 public PartiallyOrderedSet() 
Method from javax.imageio.spi.PartiallyOrderedSet Summary:
add,   clear,   contains,   hasOrdering,   iterator,   remove,   setOrdering,   size,   unsetOrdering
Methods from java.util.AbstractSet:
equals,   hashCode,   removeAll
Methods from java.util.AbstractCollection:
add,   addAll,   clear,   contains,   containsAll,   isEmpty,   iterator,   remove,   removeAll,   retainAll,   size,   toArray,   toArray,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.imageio.spi.PartiallyOrderedSet Detail:
 public boolean add(Object o) 
    Adds an Object to this PartiallyOrderedSet.
 public  void clear() 
 public boolean contains(Object o) 
 public boolean hasOrdering(Object preferred,
    Object other) 
    Returns true if an ordering exists between two nodes.
 public Iterator iterator() 
    Returns an iterator over the elements contained in this collection, with an ordering that respects the orderings set by the setOrdering method.
 public boolean remove(Object o) 
    Removes an Object from this PartiallyOrderedSet.
 public boolean setOrdering(Object first,
    Object second) 
    Sets an ordering between two nodes. When an iterator is requested, the first node will appear earlier in the sequence than the second node. If a prior ordering existed between the nodes in the opposite order, it is removed.
 public int size() 
 public boolean unsetOrdering(Object first,
    Object second) 
    Removes any ordering between two nodes.