Class ResourceSet<T>

Type Parameters:
T - The type of elements in the Set
All Implemented Interfaces:
Serializable, Cloneable, Iterable<T>, Collection<T>, Set<T>

public final class ResourceSet<T> extends HashSet<T>
Extended implementation of HashSet that includes a locked property. This class can be used to safely expose resource path sets to user classes without having to clone them in order to avoid modifications. When first created, a ResourceMap is not locked.
Author:
Craig R. McClanahan
See Also:
  • Constructor Details

    • ResourceSet

      public ResourceSet()
      Construct a new, empty set with the default initial capacity and load factor.
    • ResourceSet

      public ResourceSet(int initialCapacity)
      Construct a new, empty set with the specified initial capacity and default load factor.
      Parameters:
      initialCapacity - The initial capacity of this set
    • ResourceSet

      public ResourceSet(int initialCapacity, float loadFactor)
      Construct a new, empty set with the specified initial capacity and load factor.
      Parameters:
      initialCapacity - The initial capacity of this set
      loadFactor - The load factor of this set
    • ResourceSet

      public ResourceSet(Collection<T> coll)
      Construct a new set with the same contents as the existing collection.
      Parameters:
      coll - The collection whose contents we should copy
  • Method Details