Packagecom.yworks.bridge.util
Classpublic class AbstractSet
InheritanceAbstractSet Inheritance AbstractCollection Inheritance YObject Inheritance Object
Implements Set
Subclasses HashSet, TreeSet

AbstractSet is an abstract implementation of the Set interface. This Implementation does not support adding. A subclass must implement the abstract methods iterator() and size().



Public Properties
 PropertyDefined By
 Inheritedempty : Boolean
[read-only] Returns true if the collection has no element, otherwise false.
AbstractCollection
 Inheritedlength : int
[read-only] Answers the number of elements in this Collection.
AbstractCollection
Public Methods
 MethodDefined By
  
AbstractSet(init:Boolean = true)
Constructs a new instance of this AbstractSet.
AbstractSet
 Inherited
addAll(collection:Collection):Boolean
Adds the objects in the specified Collection to this Collection.
AbstractCollection
 Inherited
addItem(object:Object):Boolean
If the specified element is not contained within this collection, and addition of this element succeeds, then true will be returned.
AbstractCollection
 Inherited
clear():void
Removes all the elements in this collection.
AbstractCollection
  
clone():Object
[override]
AbstractSet
 Inherited
containsAll(collection:Collection):Boolean
Searches this Collection for all objects in the specified Collection.
AbstractCollection
 Inherited
containsItem(object:Object):Boolean
Searches this Collection for the specified object.
AbstractCollection
  
equals(object:Object):Boolean
[override] Compares the specified object to this Set and answer if they are equal.
AbstractSet
  
getClass():Class
[override]
AbstractSet
  
hashCode():int
[override] Answers an integer hash code for the receiver.
AbstractSet
 Inherited
Answers an Iterator on the elements of this Collection.
AbstractCollection
  
removeAll(collection:Collection):Boolean
[override] Removes all occurrences in this Collection of each object in the specified Collection.
AbstractSet
 Inherited
removeItem(object:Object):Boolean
Removes the first occurrence of the specified object from this Collection.
AbstractCollection
 Inherited
retainAll(collection:Collection):Boolean
Removes all objects from this Collection that are not contained in the specified Collection.
AbstractCollection
 Inherited
toArray():Vector.<Object>
Answers a new array containing all elements contained in this Collection.
AbstractCollection
 Inherited
toArray2(contents:Vector.<Object>):Vector.<Object>
Answers an array containing all elements contained in this Collection.
AbstractCollection
 Inherited
toString():String
Answers the string representation of this Collection.
AbstractCollection
Protected Methods
 MethodDefined By
  
cloneImpl(o:Object):void
[override]
AbstractSet
 Inherited
AbstractCollection
  
AbstractSet
Constructor Detail
AbstractSet()Constructor
public function AbstractSet(init:Boolean = true)

Constructs a new instance of this AbstractSet.

Parameters
init:Boolean (default = true) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods. This parameter can safely be ignored/omitted when calling the constructor.
Method Detail
clone()method
override public function clone():Object

Returns
Object
cloneImpl()method 
override protected function cloneImpl(o:Object):void

Parameters

o:Object

equals()method 
override public function equals(object:Object):Boolean

Compares the specified object to this Set and answer if they are equal. The object must be an instance of Set and contain the same objects.

Parameters

object:Object — the object to compare with this object

Returns
Boolean — true if the specified object is equal to this Set, false otherwise

See also

getClass()method 
override public function getClass():Class

Returns
Class
hashCode()method 
override public function hashCode():int

Answers an integer hash code for the receiver. Objects which are equal answer the same value for this method.

Returns
int — the receiver's hash

See also

initAbstractSet()method 
protected final function initAbstractSet():void

removeAll()method 
override public function removeAll(collection:Collection):Boolean

Removes all occurrences in this Collection of each object in the specified Collection.

Parameters

collection:Collection — the Collection of objects to remove

Returns
Boolean — true if this Collection is modified, false otherwise

Throws
flash.errors:IllegalOperationError — when removing from this Collection is not supported