Packagesystem.data.sets
Classpublic class CoreSet
InheritanceCoreSet Inheritance ArrayCollection Inheritance Object
Implements Set
Subclasses ArraySet, HashSet

The basic implementation of the Set interface.



Public Methods
 MethodDefined By
  
CoreSet(map:Map, init:* = null)
Creates a new CoreSet instance.
CoreSet
  
add(o:*):Boolean
[override] Adds the specified element to this set if it is not already present.
CoreSet
 Inherited
addAll(c:Collection):Boolean
Appends all of the elements in the specified collection to the end of this Collection, in the order that they are returned by the specified collection's iterator (optional operation).
ArrayCollection
  
clear():void
[override] Removes all of the elements from this Set (optional operation).
CoreSet
  
clone():*
[override] Returns a shallow copy of this Set (optional operation).
CoreSet
  
contains(o:*):Boolean
[override] Returns true if this Set contains the specified element.
CoreSet
 Inherited
Returns true if this collection contains all of the elements of the specified collection.
ArrayCollection
 Inherited
equals(o:*):Boolean
Compares the specified object with this object for equality.
ArrayCollection
  
get(key:*):*
[override] Returns the element from this collection at the passed key index.
CoreSet
  
indexOf(o:*, fromIndex:uint = 0):int
[override] Returns the index of an element in the collection.
CoreSet
  
isEmpty():Boolean
[override] Returns true if this set contains no elements.
CoreSet
  
[override] Returns an iterator over the elements in this Set.
CoreSet
  
remove(o:*):*
[override] Removes the specified element from this set if it is present.
CoreSet
 Inherited
Removes from this Collection all the elements that are contained in the specified Collection (optional operation).
ArrayCollection
 Inherited
Retains only the elements in this Collection that are contained in the specified Collection (optional operation).
ArrayCollection
  
size():uint
[override] Returns the number of elements in this set (its cardinality).
CoreSet
  
toArray():Array
[override] Returns the array representation of all the elements of this Set.
CoreSet
 Inherited
toSource(indent:int = 0):String
Returns the source code string representation of the object.
ArrayCollection
 Inherited
toString():String
Returns the string representation of this instance.
ArrayCollection
Constructor Detail
CoreSet()Constructor
public function CoreSet(map:Map, init:* = null)

Creates a new CoreSet instance.

You can use an optional parameter in this constructor with different type : an Array or a Collection instance to fill the Set object.

Parameters
map:Map — The Map reference use in the Set. The class can't be initialize i
 
init:* (default = null) — An optional Array or Collection or Iterable object to fill the collection.
Method Detail
add()method
override public function add(o:*):Boolean

Adds the specified element to this set if it is not already present.

Parameters

o:*

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

Removes all of the elements from this Set (optional operation).

clone()method 
override public function clone():*

Returns a shallow copy of this Set (optional operation).

Returns
* — a shallow copy of this Set (optional operation).
contains()method 
override public function contains(o:*):Boolean

Returns true if this Set contains the specified element.

Parameters

o:*

Returns
Booleantrue if this Set contains the specified element.
get()method 
override public function get(key:*):*

Returns the element from this collection at the passed key index.

Parameters

key:*

Returns
* — the element from this collection at the passed key index.
indexOf()method 
override public function indexOf(o:*, fromIndex:uint = 0):int

Returns the index of an element in the collection.

Parameters

o:*
 
fromIndex:uint (default = 0)

Returns
int — the index of an element in the collection.
isEmpty()method 
override public function isEmpty():Boolean

Returns true if this set contains no elements.

Returns
Boolean — true if this set contains no elements.
iterator()method 
override public function iterator():Iterator

Returns an iterator over the elements in this Set.

Returns
Iterator — an iterator over the elements in this Set.
remove()method 
override public function remove(o:*):*

Removes the specified element from this set if it is present.

Parameters

o:*

Returns
*
size()method 
override public function size():uint

Returns the number of elements in this set (its cardinality).

Returns
uint — the number of elements in this set (its cardinality).
toArray()method 
override public function toArray():Array

Returns the array representation of all the elements of this Set.

Returns
Array — the array representation of all the elements of this Set.