XList provides a wrapper object for AppleScript's list data to enable functions of Iterator, Queue, Stack. Many missing feature of AppleScript's list are covered.
Also XList will contribute pefermance of the script. The AppleScript have a characteristics that fast accessing list items must be thorugh a reference of a list. XList can hide such complications, and give simple codes with best performance.
Meke an instance of empty XList.
Meke an instance of XList with given an AppleScript's list object.
A synonym of make_with
Meke an instance of XList with from a list splitting a text with a delimiter.
return an item in the list next to the item obtained by previous next()
check whether next() can return a next item or not
The item obtained by previous next() is returned.
An index number of an item obtained by previous next() is returned.
Decrements the index of the item obtained by next(). i.e. same item can be obtained once more.
Increments the index of the item obtained by next(). i.e. skip an item.
Make next() return items form first.
Append an item at the end of the list.
Obtain last item in the stored list, and remove the item.
Append an item at the beginning of the list.
Obtain first item in the list and remove it.
Return number of elements
Delete an item specified with an index number.
Obtain an item specified with an index number. When a list of indexes is passed as an argument, multiple items will be obtained.
Obtain items between two indexes.
set an item at a specified index.
set an item at a specified index.
Exchange items specified with indexes
Check whether the object "an_item" is included in the XList instance or not.
Obtain an index number of the object "an_item" in the XList instance.
return a copy of stored list.
return the stored list.
Add each item contained passed list at end of the reciver's XList instance.
Join every elements with given a delimiters as XText
Join every elements with given a delimiters as Unicode text
A synonym of as_unicode_with. Join every elements with given a delimiters as Unicode text.
Join every elements with given a delimiters as string
Repeat to call do handler of given script object with passing each item in the XList as an argument.
Repeat to call do handler of given script object with passing a reference to each item in the XList as an argument without stopping.
Repeat to call do handler of given script object with each item in the XList as an argument.
Repeat to call do handler of given script object with passing each element as an argument. A XList consisting of the results of do handler is returned.
Repeat to call do handler of given script object with passing each element as an argument.An AppleScript's list of the results of do handler is returned.
Make a new instance which share internal list with the original.The internal counter for the iterator will be copied.
Make a new instance which have copied internal list from the original.
Make a shallow copy with resetting the internal iterator counter.