UniqueList
| Kind of class: | public class |
|---|---|
| Package: | org.casalib.collection |
| Inherits from: | List |
| Version: | 04/27/08 |
| Author: | Aaron Clinger |
| Classpath: | org.casalib.collection.UniqueList |
| File last modified: | Sunday, 28 March 2010, 11:55:54 |
An ordered or sequence collection that contains no duplicates. Similar to Java's Set but contains all the methods of List.
See also:
Summary
Constructor
- UniqueList (collection:Array = null)
- Creates a new UniqueList;
Instance properties
Instance properties inherited from List
Instance methods
- addItem (item:*) : Boolean
- Appends the specified item to the end of this list.
- addItemAt (item:*, index:int) : Boolean
- Inserts an item as a specified position.
- addItems (items:IList) : Boolean
- Modifies original list by adding all the elements from another list that aren't already present.
- addItemsAt (items:IList, index:int = 0x7fffffff) : Boolean
- Modifies original list by adding all the elements from another list, that aren't already present, at a specified position.
- setItem (item:*, index:int) : *
- Replaces an item at a specified position.
- subList (startIndex:int = 0, endIndex:int = 16777215) : IList
Constructor
UniqueList
public function UniqueList (collection:Array = null)Creates a new UniqueList;Parameters:collection:An Array of items to populate the contents of this list; UniqueList will only accept the unique elements of the Array.Instance methods
addItem
override public function addItem (item:*) : BooleanAppends the specified item to the end of this list.#Parameters:item:Element to be inserted.#Returns:- Returns
trueif the element was unique and added; otherwisefalse.
Overrides:addItemAt
override public function addItemAt (item:*, index:int) : BooleanInserts an item as a specified position.#Returns:- Returns
trueif the element was unique and added; otherwisefalse.
Overrides:addItems
Modifies original list by adding all the elements from another list that aren't already present.Parameters:items:List of elements to add.#Returns:- Returns
trueif any elements of the specified list were unique and added; otherwisefalse.
Overrides:addItemsAt
Modifies original list by adding all the elements from another list, that aren't already present, at a specified position.Returns:- Returns
trueif any elements of the specified list were unique and added; otherwisefalse.
Overrides:clone
Returns a list that is an exact copy of the original list.#Returns:- Returns a list that is an exact copy of the original list.#
Overrides:
- addItems (items:IList) : Boolean
- addItemAt (item:*, index:int) : Boolean