Method New ( map:Map<T,Object> )
Extending classes should invoke this method with a valid map object to be used to implement the set.
Impressum, Datenschutzerklärung
A set is a container style object that provides a mechanism for keeping track of a number of objects. More...
Extended By | |
---|---|
FloatSet ,
IntSet ,
StringSet
|
Constructors | |
---|---|
New ( map:Map<T,Object> ) |
Extending classes should invoke this method with a valid map object to be used to implement the set. |
Methods | |
---|---|
Clear : Int () |
Removes all items from the set. |
Contains : Bool ( value:T ) |
Return True if the specified value is contained in the set, else False. |
Count : Int () |
Counts and returns the number of objects in the set. |
Insert : Int ( value:T ) |
Inserts value into the set. |
IsEmpty : Bool () |
Returns True if the set is empty, ie: contains no items, else False. |
ObjectEnumerator : Object () |
Returns an enumerator object that allows sets to be used with For Eachin loops. |
Remove : Int ( value:T ) |
Removes value from the set. |
A set is a container style object that provides a mechanism for keeping track of a number of objects.
Each object in a set occurs exactly once - inserting the same object into a set multiple times does not result in the set containing multiple references to the same object.
Sets are implemented behind the scenes using Map objects, and are just as efficient at insertng, removing and finding objects.
Classes that extend Set
Method New ( map:Map<T,Object> )
Extending classes should invoke this method with a valid map object to be used to implement the set.
Method Clear : Int ()
Removes all items from the set.
Method Contains : Bool ( value:T )
Return True if the specified value is contained in the set, else False.
Parametersvalue - value to check
Method Count : Int ()
Counts and returns the number of objects in the set.
Note that this method takes O(N) time - that is, it must visit each object in the set.
Method Insert : Int ( value:T )
Inserts value into the set.
Parametersvalue - value to insert.
Method IsEmpty : Bool ()
Returns True if the set is empty, ie: contains no items, else False.
Method ObjectEnumerator : Object ()
Returns an enumerator object that allows sets to be used with For Eachin loops.
Method Remove : Int ( value:T )
Removes value from the set.
Parametersvalue - value to remove.