Legal Notice, Privacy Policy

Impressum, Datenschutzerklärung

Cerberus X Documentation

Class IntList

IntList is a convenience class for handling lists of integer values. More...

Declarations

Extends
List : <Int> A linked list is a container style data structure that provides efficient support for the addition, removal and sequential traversal of objects.
Constructors
New () Creates a new empty IntList.
Methods
Compare : Int ( lhs:Int, rhs:Int ) Implements the List.Compare method, which allows IntLists to be sorted using the Sort method.
Inherited Methods
AddFirst : Node<T> ( data:T ) Adds a value at the start of the list.
AddLast : Node<T> ( data:T ) Adds a value at the end of the list.
Backwards : Object () Returns an object that may be used to iterate backwards through the list with a For EachIn loop.
Clear : Int () Removes all the elements from the list.
Contains : Bool ( value:T ) Returns true if list contains value.
Count : Int () Returns the number of elements in the list.
Equals : Bool ( lhs:T, rhs:T ) This method is used by the Contains, RemoveFirst, RemoveLast and RemoveEach methods to determine element equality.
Find : Node<T> ( value:T ) Finds the node containing the first element in the list equal to value.
FindLast : Node<T> ( value:T ) Finds the node containing the last element in the list equal to value.
First : T () Returns the first element in the list.
FirstNode : Node<T> () Return the first node in the list, or Null if the list is empty.
InsertAfter : Node<T> ( where:T, data:T ) Inserts data after the first element in the list equal to where.
InsertAfterEach : Void ( where:T, data:T ) Inserts data after each element in the list equal to where.
InsertBefore : Node<T> ( where:T, data:T ) Inserts data before the first element in the list equal to where.
InsertBeforeEach : Void ( where:T, data:T ) Inserts data before each element in the list equal to where.
IsEmpty : Bool () Return True if the list is empty, else False.
Last : T () Returns the last element in the list.
LastNode : Node<T> () Returns the last node in the last, or Null if the list is empty.
ObjectEnumerator : Object () Returns an object enumerator for use with For Eachin loops.
RemoveEach : Int ( value:T ) Finds and removes each element in the list equal to value.
RemoveFirst : T () Removes the first value in the list and returns it.
RemoveFirst : Void ( value:T ) Finds and removes the first element in the list equal to value.
RemoveLast : T () Removes the last value in the list and returns it.
RemoveLast : Void ( value:T ) Finds and removes the last element in the list equal to value.
Sort : Int ( ascending:Int=True ) Sorts the list into ascending or descending order.
ToArray : T[] () Converts the list to an array of values.

Detailed Discussion

IntList is a convenience class for handling lists of integer values.


Constructors Documentation

Method New ()

Creates a new empty IntList.


Methods Documentation

Method Compare : Int ( lhs:Int, rhs:Int )

Implements the List.Compare method, which allows IntLists to be sorted using the Sort method.