ch.panter.li.bi.util
Class ShieldableSet<T>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<E>
          extended by java.util.HashSet<T>
              extended by ch.panter.li.bi.util.ShieldableSet<T>
All Implemented Interfaces:
ReadOnlySet<T>, Serializable, Cloneable, Iterable<T>, Collection<T>, Set<T>

public class ShieldableSet<T>
extends HashSet<T>
implements ReadOnlySet<T>

See Also:
Serialized Form

Constructor Summary
ShieldableSet()
          Creates a new empty instance
ShieldableSet(Collection<T> initialContents)
          Creates a new instance and adds the given initial contents.
ShieldableSet(T... initialContents)
          Creates a new instance and adds the given initial contents.
 
Method Summary
 T[] itemsAsArray(T[] array)
          Returns an array containing all items of this instance according to the contract defined in java.util.Collection#toArray(T[] a).
 
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 ch.panter.li.bi.util.ReadOnlySet
contains, isEmpty, iterator, size
 
Methods inherited from interface java.util.Set
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Constructor Detail

ShieldableSet

public ShieldableSet()
Creates a new empty instance


ShieldableSet

public ShieldableSet(T... initialContents)
Creates a new instance and adds the given initial contents.

Parameters:
initialContents - the initial contents of this new instance

ShieldableSet

public ShieldableSet(Collection<T> initialContents)
Creates a new instance and adds the given initial contents.

Parameters:
initialContents - the initial contents of this new instance
Method Detail

itemsAsArray

public T[] itemsAsArray(T[] array)
Description copied from interface: ReadOnlySet
Returns an array containing all items of this instance according to the contract defined in java.util.Collection#toArray(T[] a).

Specified by:
itemsAsArray in interface ReadOnlySet<T>
Parameters:
array - the target array
Returns:
an array containing all items of this instance


Copyright 2007-2007 SourceForge. All Rights Reserved.