| Package | com.addicted2flash.util |
| Class | public class SortedArraySet |
| Inheritance | SortedArraySet ArraySet AbstractArraySet AbstractArrayCollection |
| Implements | ISortedSet |
Array-based set.
A collection that contains no duplicate elements and at most one null element.
| Method | Defined by | ||
|---|---|---|---|
|
SortedArraySet(cmp:IComparator, field:Array = null)
Create a new
SortedArraySet
| SortedArraySet | ||
|
add(o:*):void
Appends the specified element to the end of this list (optional operation).
| SortedArraySet | ||
![]() |
addAll(c:ICollection):void
Adds all of the elements in the specified collection to this collection (optional operation).
| AbstractArrayCollection | |
![]() |
clear():void
Removes all of the elements from this list (optional operation).
| AbstractArrayCollection | |
|
Returns a copy of the
ICollection. | SortedArraySet | ||
|
Returns the comparator used to order the elements in this set.
| SortedArraySet | ||
![]() |
contains(o:*):Boolean
Returns true if this list contains the specified element.
| AbstractArrayCollection | |
![]() |
containsAll(c:ICollection):Boolean
Returns true if this collection contains all of the elements in the specified collection.
| AbstractArrayCollection | |
|
dispose():void
free memory for garbage collection.
| SortedArraySet | ||
|
first():*
Returns the first (lowest) element currently in this set.
| SortedArraySet | ||
![]() |
getAt(i:int):*
Returns the element at the specified position in this collection.
| AbstractArrayCollection | |
|
headSortedSet(toElement:*):ISortedSet
Returns a view of the portion of this set whose elements are strictly less than toElement.
| SortedArraySet | ||
![]() |
isEmpty():Boolean
Returns true if this list contains no elements.
| AbstractArrayCollection | |
![]() |
Returns an iterator over the elements in this list.
| AbstractArrayCollection | |
|
last():*
Returns the last (highest) element currently in this set.
| SortedArraySet | ||
![]() |
remove(o:*):Boolean
Removes the first occurrence in this list of the specified element (optional operation).
| AbstractArrayCollection | |
![]() |
removeAll(c:ICollection):Boolean
Removes a single instance of the specified element from this collection, if it is present (optional operation)
| AbstractArrayCollection | |
![]() |
size():int
Returns the number of elements in this list.
| AbstractArrayCollection | |
|
subSortedSet(fromElement:*, toElement:*):ISortedSet
Returns a view of the portion of this set whose elements range from fromElement, inclusive,
to toElement, exclusive.
| SortedArraySet | ||
|
tailSortedSet(fromElement:*):ISortedSet
Returns a view of the portion of this set whose elements are greater than or equal to fromElement.
| SortedArraySet | ||
![]() |
toArray():Array
Converts the collection into an array.
| AbstractArrayCollection | |
|
toString():String
String representation of
SortedArraySet. | SortedArraySet | ||
| SortedArraySet | () | constructor |
public function SortedArraySet(cmp:IComparator, field:Array = null)
Create a new SortedArraySet
cmp:IComparator — IComparator for ordering elements
|
|
field:Array (default = null) — (optional) an existing Array ( will be ordered immediately after instantiation )
|
| add | () | method |
public override function add(o:*):voidAppends the specified element to the end of this list (optional operation).
Parameterso:* |
| clone | () | method |
public override function clone():ICollection
Returns a copy of the ICollection.
ICollection —
a copy of the ICollection
|
| comparator | () | method |
public function comparator():IComparatorReturns the comparator used to order the elements in this set.
ReturnsIComparator —
the comparator used to order the elements in this set.
|
| dispose | () | method |
public override function dispose():voidfree memory for garbage collection.
| first | () | method |
public function first():*Returns the first (lowest) element currently in this set.
Returns* — the first (lowest) element currently in this set (or null if set is empty)
|
| headSortedSet | () | method |
public function headSortedSet(toElement:*):ISortedSetReturns a view of the portion of this set whose elements are strictly less than toElement. The returned set is backed by this set, so changes in the returned set are reflected in this set, and vice-versa. The returned set supports all optional set operations that this set supports.
ParameterstoElement:* — high endpoint (exclusive) of the returned set
|
ISortedSet —
a view of the portion of this set whose elements are strictly less than toElement (return empty
sorted set, if toElement doesn't exist)
|
| last | () | method |
public function last():*Returns the last (highest) element currently in this set.
Returns* — the last (highest) element currently in this set (or null if set is empty)
|
| subSortedSet | () | method |
public function subSortedSet(fromElement:*, toElement:*):ISortedSetReturns a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive. (If fromElement and toElement are equal, the returned set is empty.) The returned set is backed by this set, so changes in the returned set are reflected in this set, and vice-versa. The returned set supports all optional set operations that this set supports.
ParametersfromElement:* — low endpoint (inclusive) of the returned set
|
|
toElement:* — high endpoint (exclusive) of the returned set
|
ISortedSet —
a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive
|
| tailSortedSet | () | method |
public function tailSortedSet(fromElement:*):ISortedSetReturns a view of the portion of this set whose elements are greater than or equal to fromElement. The returned set is backed by this set, so changes in the returned set are reflected in this set, and vice-versa. The returned set supports all optional set operations that this set supports.
ParametersfromElement:* — low endpoint (inclusive) of the returned set
|
ISortedSet —
a view of the portion of this set whose elements are greater than or equal to fromElement
|
| toString | () | method |
public override function toString():String
String representation of SortedArraySet.
String — String representation of SortedArraySet
|