| Package | system.data |
| Interface | public interface Bag extends Collection, Equatable, Cloneable, Iterable, Serializable |
| Implementors | CoreMapBag |
| Method | Defined By | ||
|---|---|---|---|
![]() | add(o:*):Boolean
Ensures that this collection contains the specified element (optional operation). | Collection | |
addAll(c:Collection):Boolean
Insert all elements represented in the given collection. | Bag | ||
addCopies(o:*, nCopies:uint):Boolean
Adds n copies of the given object to the bag and keep a count. | Bag | ||
![]() | clear():void
Removes all of the elements from this collection (optional operation). | Collection | |
![]() | clone():*
Creates and returns a shallow copy of the object. | Cloneable | |
![]() | contains(o:*):Boolean
Returns true if this collection contains the specified element. | Collection | |
containsAll(c:Collection):Boolean
Returns true if the bag contains all elements in the given collection, respecting cardinality. | Bag | ||
![]() | equals(o:*):Boolean
Compares the specified object with this object for equality. | Equatable | |
![]() | get(key:*):*
Returns the element from this collection at the passed index. | Collection | |
getCount(o:*):uint
Returns the number of occurrences (cardinality) of the given object currently in the bag. | Bag | ||
![]() | indexOf(o:*, fromIndex:uint = 0):int
Returns the position of the passed object in the collection. | Collection | |
![]() | isEmpty():Boolean
Returns true if this collection contains no elements. | Collection | |
![]() |
Returns the iterator reference of the object. | Iterable | |
![]() | remove(o:*):*
Removes a single instance of the specified element from this collection, if it is present (optional operation). | Collection | |
removeAll(c:Collection):Boolean
Removes objects from the bag according to their count in the specified collection. | Bag | ||
removeCopies(o:*, nCopies:uint):Boolean
Removes a specified number of copies of an object from the bag. | Bag | ||
retainAll(c:Collection):Boolean
Removes any members of the bag that are not in the given collection, respecting cardinality. | Bag | ||
![]() | size():uint
Retrieves the number of elements in this collection. | Collection | |
![]() | toArray():Array
Returns an array containing all of the elements in this collection. | Collection | |
![]() | toSource(indent:int = 0):String
Returns the source code string representation of the object. | Serializable | |
Returns the Set of unique members that represent all members in the bag. | Bag | ||
| addAll | () | method |
public function addAll(c:Collection):BooleanInsert all elements represented in the given collection.
Parameters
c:Collection |
Boolean |
| addCopies | () | method |
public function addCopies(o:*, nCopies:uint):BooleanAdds n copies of the given object to the bag and keep a count.
Parameters
o:* | |
nCopies:uint |
Boolean |
| containsAll | () | method |
public function containsAll(c:Collection):Boolean
Returns true if the bag contains all elements in the given collection, respecting cardinality.
Parameters
c:Collection |
Boolean — true if the bag contains all elements in the given collection, respecting cardinality.
|
| getCount | () | method |
public function getCount(o:*):uintReturns the number of occurrences (cardinality) of the given object currently in the bag.
Parameters
o:* |
uint — the number of occurrences (cardinality) of the given object currently in the bag.
|
| removeAll | () | method |
public function removeAll(c:Collection):BooleanRemoves objects from the bag according to their count in the specified collection.
Parameters
c:Collection — the collection to use.
|
Boolean — true if the bag changed.
|
| removeCopies | () | method |
public function removeCopies(o:*, nCopies:uint):BooleanRemoves a specified number of copies of an object from the bag.
Parameters
o:* — the object to remove
| |
nCopies:uint — the number of copies to remove
|
Boolean — true if the bag changed
|
| retainAll | () | method |
public function retainAll(c:Collection):BooleanRemoves any members of the bag that are not in the given collection, respecting cardinality.
Parameters
c:Collection |
Boolean |
| uniqueSet | () | method |
public function uniqueSet():SetReturns the Set of unique members that represent all members in the bag.
ReturnsSet — the Set of unique members that represent all members in the bag.
|