| Package | com.threerings.util.sets |
| Class | public class MapSet |
| Implements | Set |
| Method | Defined by | ||
|---|---|---|---|
| MapSet | |||
|
add(o:Object):Boolean
Adds the specified element to the set if it's not already present.
| MapSet | ||
|
clear():void
Remove all elements from this set.
| MapSet | ||
|
contains(o:Object):Boolean
Returns true if this set contains the specified element.
| MapSet | ||
|
forEach(fn:Function):void
Call the specified function, which accepts an element as an argument.
| MapSet | ||
|
isEmpty():Boolean
Returns true if this set contains no elements.
| MapSet | ||
|
remove(o:Object):Boolean
Removes the specified element from this set if it is present.
| MapSet | ||
|
size():int
Retuns the number of elements in this set.
| MapSet | ||
|
toArray():Array
Returns all elements in the set in an Array.
| MapSet | ||
| MapSet | () | constructor |
| add | () | method |
public function add(o:Object):BooleanAdds the specified element to the set if it's not already present. Returns true if the set did not already contain the specified element.
Parameterso:Object |
Boolean |
| clear | () | method |
public function clear():voidRemove all elements from this set.
| contains | () | method |
public function contains(o:Object):BooleanReturns true if this set contains the specified element.
Parameterso:Object |
Boolean |
| forEach | () | method |
public function forEach(fn:Function):void
Call the specified function, which accepts an element as an argument.
Signature:
function (o :Object) :void
or
function (o :Object) :Boolean
If you return a Boolean, you may return true to indicate that you've
found what you were looking for, and halt iteration.
fn:Function |
| isEmpty | () | method |
public function isEmpty():BooleanReturns true if this set contains no elements.
ReturnsBoolean |
| remove | () | method |
public function remove(o:Object):BooleanRemoves the specified element from this set if it is present. Returns true if the set contained the specified element.
Parameterso:Object |
Boolean |
| size | () | method |
public function size():intRetuns the number of elements in this set.
Returnsint |
| toArray | () | method |
public function toArray():ArrayReturns all elements in the set in an Array. The Array is not a 'view': it can be modified without disturbing the Map from whence it came.
ReturnsArray |