Name |
StringList字符串列表类 |
||||||||||||||||||||||||||||
Examples |
StringList inventory;
void setup() { size(200, 200); inventory = new StringList(); inventory.append(“coffee”); inventory.append(“flour”); inventory.append(“tea”); println(inventory); noLoop(); fill(0); textAlign(CENTER); }
void draw() { String item = inventory.get(2); text(item, width/2, height/2); } |
||||||||||||||||||||||||||||
Description |
Helper class for a list of Strings. Lists are designed to have some of the features of ArrayLists, but to maintain the simplicity and efficiency of working with arrays. Functions like sort() and shuffle() always act on the list itself. To get a sorted copy, use list.copy().sort(). 字符串列表的帮助器类。列表被设计为具有 ArrayLists 的一些功能, 但要保持使用数组的简单性和效率。
排序 () 和无序 () 之类的函数总是在列表本身上执行。若要获取已排序的副本, 请使用列表. 复制 (). 排序 ()。 |
||||||||||||||||||||||||||||
Methods |
|
||||||||||||||||||||||||||||
Constructor |
StringList() StringList(items) |
||||||||||||||||||||||||||||
Related |
IntList |
- 本文固定链接: http://iprocessing.cn/2017/07/20/stringlist字符串列表类/
- 转载请注明: 卡萨布兰卡 于 Processing编程艺术 发表