forked from processing/processing-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIntList.xml
More file actions
49 lines (37 loc) · 902 Bytes
/
IntList.xml
File metadata and controls
49 lines (37 loc) · 902 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>IntList</name>
<category>Data</category>
<subcategory>Composite</subcategory>
<type></type>
<example>
<image></image>
<code><![CDATA[
IntList inventory;
void setup() {
size(200, 200);
inventory = new IntList();
inventory.append(84);
inventory.append(15);
inventory.append(102);
println(inventory);
noLoop();
fill(0);
textAlign(CENTER);
}
void draw() {
int nums = inventory.get(2);
text(nums, width/2, height/2);
}
]]></code>
</example>
<description><![CDATA[
Helper class for a list of ints. Lists are designed to have some of the
features of ArrayLists, but to maintain the simplicity and efficiency of
working with arrays. <br />
<br />
Functions like sort() and shuffle() always act on the list itself. To get
a sorted copy, use list.copy().sort().
]]></description>
<type>class</type>
</root>