Packageorg.servebox.commons.collection
Classpublic class HashSet
InheritanceHashSet Inheritance AbstractSet Inheritance AbstractCollection Inheritance BasicObject
ImplementsISet

Implementation the ISet interface. The unicity is ensured using an internal Hashtable.



Public Properties
 PropertyDefined by
 InheritedinternalInstanceId : uint
The internal instance id of the object.
BasicObject
Protected Properties
 PropertyDefined by
  _elements : Hashtable
HashSet
 Inherited_list : Array
AbstractCollection
Public Methods
 MethodDefined by
  
HashSet(collection:ICollection = null)
HashSet
  
add(o:IBasicObject):Boolean
Adds the specified element to the collection.
HashSet
  
addAll(c:ICollection):Boolean
Adds the specified elements to the collection.
HashSet
  
clear():void
Empties the collection.
HashSet
  
HashSet
 Inherited
Indicates whether the collection contains the specified elements.
AbstractCollection
 Inherited
equals(o:IBasicObject):Boolean
Object comparison mechanism.
AbstractCollection
 Inherited
fromArray(ar:Array):void
Sets the collection content using an Array of elements.
AbstractCollection
 Inherited
Generates a unique unsigned integer id at instanciation
BasicObject
 Inherited
hashCode():int
Returns the hashcode of the object.
BasicObject
 Inherited
isEmpty():Boolean
Indicates whether the collection contains elements.
AbstractSet
  
Retrieves an iterator over a set of objects.
HashSet
  
remove(o:IBasicObject):Boolean
Removes the specified element from the collection.
HashSet
 Inherited
Removes the specified elements from the collection.
AbstractSet
  
size():int
The number of elements in the collection.
HashSet
  
toArray():Array
Retrieves the elements of the collection into an Array instance.
HashSet
 Inherited
toString():String
Returns the string representation of the specified object.
BasicObject
Protected Methods
 MethodDefined by
 Inherited
AbstractCollection
Property detail
_elementsproperty
protected var _elements:Hashtable
Constructor detail
HashSet()constructor
public function HashSet(collection:ICollection = null)Parameters
collection:ICollection (default = null)
Method detail
add()method
public override function add(o:IBasicObject):Boolean

Adds the specified element to the collection.

Parameters
o:IBasicObject

Returns
Boolean
addAll()method 
public override function addAll(c:ICollection):Boolean

Adds the specified elements to the collection.

Parameters
c:ICollection

Returns
Boolean
clear()method 
public override function clear():void

Empties the collection.

contains()method 
public override function contains(o:IBasicObject):BooleanParameters
o:IBasicObject

Returns
Boolean
iterator()method 
public override function iterator():IIterator

Retrieves an iterator over a set of objects.

Returns
IIterator
remove()method 
public override function remove(o:IBasicObject):Boolean

Removes the specified element from the collection.

Parameters
o:IBasicObject

Returns
Boolean
size()method 
public override function size():int

The number of elements in the collection.

Returns
int
toArray()method 
public override function toArray():Array

Retrieves the elements of the collection into an Array instance.

Returns
Array