Class 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:
  • Iteration order reflects addition order (this property is inherited from LinkedHashSet)
  • An addUnique(E) method that throws JiBXException if the item is already in the set (suitable for use as a JiBX add-method)
Since:
1.0.64
See Also:
  • Constructor Details

    • ListableHashSet

      public ListableHashSet()
    • ListableHashSet

      public ListableHashSet(Collection<? extends E> c)
    • ListableHashSet

      public ListableHashSet(int initialCapacity)
    • ListableHashSet

      public ListableHashSet(int initialCapacity, float loadFactor)
  • Method Details

    • 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.
      Parameters:
      item - item to add
      Throws:
      JiBXException - if item is already in the set