Home

CompareList

Stores a linked list of comparable values

Operations

New

Default constructor

New()

AddBack

Adds a value to the end

method : public : native : AddBack(value:Compare) ~ Nil
Parameters
NameTypeDescription
valueComparevalue to append

AddFront

Adds a value to the front

method : public : native : AddFront(value:Compare) ~ Nil
Parameters
NameTypeDescription
valueComparevalue to prepend

Back

Returns the last element in the list

method : public : Back() ~ Compare
Return
TypeDescription
Comparelast element in the list, 0.0 if the list is empty

Empty

Clears the list

method : public : Empty() ~ Nil

Find

Finds a value in the list and sets the pointer

method : public : Find(value:Compare) ~ Compare
Parameters
NameTypeDescription
valueComparevalue to search for

Return
TypeDescription
Comparevalue that's found

Forward

Moves the pointer to the end of the list

method : public : Forward() ~ Nil

Front

Returns the first element in the list

method : public : Front() ~ Compare
Return
TypeDescription
Comparefirst element in the list, 0.0 if the list is empty

Get

Gets the value that's currently pointed to

method : public : Get() ~ Compare
Return
TypeDescription
Comparevalue value

Has

Searches for a value

method : public : Has(value:Compare) ~ Bool
Parameters
NameTypeDescription
valueComparevalue to check for

Return
TypeDescription
Booltrue if value is found, false otherwise

Insert

Inserts a value into the list based upon the pointer location

method : public : native : Insert(value:Compare) ~ Bool
Parameters
NameTypeDescription
valueComparevalue to insert

IsBack

Checks to see if the pointer is at the end of the list

method : public : IsBack() ~ Bool
Return
TypeDescription
Booltrue if pointer is at the end of the list, false otherwise

IsEmpty

Checks to see if the list is empty

method : public : IsEmpty() ~ Bool
Return
TypeDescription
Booltrue if empty, false otherwise

IsFront

Checks to see if the pointer is at the front of the list

method : public : IsFront() ~ Bool
Return
TypeDescription
Booltrue if pointer is at the front of the list, false otherwise

More

Checks to see the pointer can be advanced

method : public : More() ~ Bool
Return
TypeDescription
Booltrue if pointer can be advanced, false otherwise

Next

Advances the pointer

method : public : Next() ~ Nil

Previous

Retreats the pointer

method : public : Previous() ~ Nil

Remove

Removes the element at the pointer position

method : public : native : Remove() ~ Nil

RemoveBack

Removes the last value from the list

method : public : RemoveBack() ~ Nil

RemoveFront

Removes the first value from the list

method : public : RemoveFront() ~ Nil

Rewind

Moves the pointer to the start of the list

method : public : Rewind() ~ Nil

Size

Size of list

method : public : Size() ~ Int
Return
TypeDescription
Intsize of list