org.dellroad.stuff.jibx
Class ListableHashSet<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<E>
          extended by java.util.HashSet<E>
              extended by java.util.LinkedHashSet<E>
                  extended by org.dellroad.stuff.jibx.ListableHashSet<E>
All Implemented Interfaces:
Serializable, Cloneable, Iterable<E>, Collection<E>, Set<E>

public class ListableHashSet<E>
extends LinkedHashSet<E>

Set implementation with these properties which make it suitable for use with JiBX:

Since:
1.0.64
See Also:
Serialized Form

Constructor Summary
ListableHashSet()
           
ListableHashSet(Collection<? extends E> c)
           
ListableHashSet(int initialCapacity)
           
ListableHashSet(int initialCapacity, float loadFactor)
           
 
Method Summary
 void addUnique(E item)
          Add an item to a set while verifying that the item is not already in the set.
 
Methods inherited from class java.util.HashSet
add, clear, clone, contains, isEmpty, iterator, remove, size
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Constructor Detail

ListableHashSet

public ListableHashSet()

ListableHashSet

public ListableHashSet(Collection<? extends E> c)

ListableHashSet

public ListableHashSet(int initialCapacity)

ListableHashSet

public ListableHashSet(int initialCapacity,
                       float loadFactor)
Method Detail

addUnique

public void addUnique(E item)
               throws JiBXException
Add an item to a set while verifying that the item is not already in the set.

Throws:
JiBXException - if item is already in the set