| Package | system.data.trees |
| Class | public class Trie |
| Inheritance | Trie Object |
More informations in wikipedia : Trie
| Property | Defined By | ||
|---|---|---|---|
| aerageClash : Number [read-only]
Indicates the aerage clash value of the trie. | Trie | ||
| entries : Map
Indicates the Map of entries in this trie. | Trie | ||
| entry : TrieEntry
Indicates the trie entry of this trie. | Trie | ||
| numTries : int [read-only]
Indicates the numbers of tries in this trie. | Trie | ||
| position : int [read-only]
Returns the character offset that this trie is off the main trie. | Trie | ||
| previous : Trie
Indicates the previous Trie of this trie. | Trie | ||
| Method | Defined By | ||
|---|---|---|---|
Creates a new Trie instance. | Trie | ||
add(key:String, value:*):void
Inserts the provided object into the trie with the given key. | Trie | ||
contents(str:String):String
Take current Trie and dump output to StringBuffer
| Trie | ||
Returns the first element in a trie. | Trie | ||
getTrieFor(key:String):*
Returns a Trie of all the elements starting with "key", or an Object which is a single exact match. | Trie | ||
isEmpty():Boolean
Indicates if the trie is empty. | Trie | ||
remove(key:String):void
Removes the object with the given key from the trie. | Trie | ||
search(key:String):*
Returns a trie for multiple matches else returns null for no object matched, or returns the object matched. | Trie | ||
searchExact(key:String):*
Returns a trie but 'not' return a Trie for 'multiple matches'. | Trie | ||
size():int
Counts the number of linked objects off this trie. | Trie | ||
toArray(comparator:Comparator = null):Array
Returns the Array representation of the object. | Trie | ||
toString():String
Returns the String representation of the object. | Trie | ||
| aerageClash | property |
aerageClash:Number [read-only] Indicates the aerage clash value of the trie.
public function get aerageClash():Number| entries | property |
entries:MapIndicates the Map of entries in this trie.
public function get entries():Map public function set entries(value:Map):void| entry | property |
entry:TrieEntryIndicates the trie entry of this trie.
public function get entry():TrieEntry public function set entry(value:TrieEntry):void| numTries | property |
numTries:int [read-only] Indicates the numbers of tries in this trie.
public function get numTries():int| position | property |
position:int [read-only] Returns the character offset that this trie is off the main trie.
public function get position():int| previous | property |
previous:TrieIndicates the previous Trie of this trie.
public function get previous():Trie public function set previous(value:Trie):void| Trie | () | Constructor |
public function Trie(parent:Trie = null)Creates a new Trie instance.
Parametersparent:Trie (default = null) — This argument is used only inside the class.
|
| add | () | method |
public function add(key:String, value:*):voidInserts the provided object into the trie with the given key.
Parameters
key:String | |
value:* |
NonUniqueKeyError — If the specified key is non unique.
|
| contents | () | method |
public function contents(str:String):StringTake current Trie and dump output to StringBuffer
Parameters
str:String |
String — String holding content of current Trie
|
| firstElement | () | method |
public function firstElement():TrieEntryReturns the first element in a trie. Is generally only used when an element is erased from the trie and a trie delete a swapup is required.
ReturnsTrieEntry — the first element in a trie. Is generally only used when an element is erased from the trie and a trie delete a swapup is required.
|
| getTrieFor | () | method |
public function getTrieFor(key:String):*Returns a Trie of all the elements starting with "key", or an Object which is a single exact match.
Parameters
key:String |
* — a Trie of all the elements starting with "key", or an Object which is a single exact match.
|
| isEmpty | () | method |
public function isEmpty():BooleanIndicates if the trie is empty.
ReturnsBoolean |
| remove | () | method |
public function remove(key:String):voidRemoves the object with the given key from the trie.
Parameters
key:String |
| search | () | method |
public function search(key:String):*Returns a trie for multiple matches else returns null for no object matched, or returns the object matched.
Parameters
key:String |
* — a trie for multiple matches else returns null for no object matched, or returns the object matched.
|
| searchExact | () | method |
public function searchExact(key:String):*Returns a trie but 'not' return a Trie for 'multiple matches'.
Parameters
key:String |
* — a trie but 'not' return a Trie for 'multiple matches'.
|
| size | () | method |
public function size():intCounts the number of linked objects off this trie.
Returnsint — The number of linked objects in this trie.
|
| toArray | () | method |
public function toArray(comparator:Comparator = null):ArrayReturns the Array representation of the object.
Parameters
comparator:Comparator (default = null) |
Array — the Array representation of the object.
|
| toString | () | method |
public function toString():StringReturns the String representation of the object.
ReturnsString — the String representation of the object.
|