Packagech.capi.data.tree
Interfacepublic interface IHeap extends IDataStructure
Implementors ArrayHeap

Represents a heap data structure.



Public Properties
 PropertyDefined By
 InheritednextElement : *
[read-only] Defines the next element that will be removed from the data structure.
IDataStructure
  sortFunction : Function
[read-only] Defines the sort function that will be used to sort the items.
IHeap
Public Methods
 MethodDefined By
 Inherited
add(element:*):void
Add an element to the data structure.
IDataStructure
 Inherited
clear():void
Removes all the elements from the data structure.
IDataStructure
  
contains(element:*):Boolean
Retrieves if the specified element is contained in the IHeap.
IHeap
 Inherited
isEmpty():Boolean
Get if the structure is empty or not.
IDataStructure
 Inherited
remove():*
Removes an element from the data structure.
IDataStructure
Property Detail
sortFunctionproperty
sortFunction:Function  [read-only]

Defines the sort function that will be used to sort the items.


Implementation
    public function get sortFunction():Function
Method Detail
contains()method
public function contains(element:*):Boolean

Retrieves if the specified element is contained in the IHeap.

Parameters

element:* — The element.

Returns
Booleantrue if the element is contained in the IHeap.