Class cc.Set
Extends
cc.Class.
Defined in: CCSet.js.
Constructor Attributes | Constructor Name and Description |
---|---|
cc.Set()
|
Method Attributes | Method Name and Description |
---|---|
addObject(obj)
Add a element into cc.Set, it will retain the element.
|
|
Return the first element if it contains elements, or null if it doesn't contain any element.
|
|
begin()
Return the iterator that points to the first element.
|
|
containsObject(obj)
Check if cc.Set contains a element equals obj.
|
|
copy()
Return a copy of the cc.Set, it will copy all the elelments.
|
|
count()
Return the number of elements the cc.Set contains.
|
|
ctor(setObject)
Constructor
|
|
end()
Return the iterator that points to the poisition after the last element.
|
|
It is the same as copy().
|
|
removeObject(obj)
Remove the given element, nothing todo if no element equals obj.
|
Method Detail
addObject(obj)
Add a element into cc.Set, it will retain the element.
- Parameters:
- {object} obj
{object|Null}
anyObject()
Return the first element if it contains elements, or null if it doesn't contain any element.
- Returns:
- {object|Null}
begin()
Return the iterator that points to the first element.
{Boolean}
containsObject(obj)
Check if cc.Set contains a element equals obj.
- Parameters:
- {object} obj
- Returns:
- {Boolean}
{cc.Set}
copy()
Return a copy of the cc.Set, it will copy all the elelments.
- Returns:
- {cc.Set}
{Number}
count()
Return the number of elements the cc.Set contains.
- Returns:
- {Number}
ctor(setObject)
Constructor
- Parameters:
- {cc.Set} setObject
end()
Return the iterator that points to the poisition after the last element.
{cc.Set}
mutableCopy()
It is the same as copy().
- Returns:
- {cc.Set}
removeObject(obj)
Remove the given element, nothing todo if no element equals obj.
- Parameters:
- {object} obj