-
-
Notifications
You must be signed in to change notification settings - Fork 173
Expand file tree
/
Copy pathIntDict.xml
More file actions
44 lines (32 loc) · 755 Bytes
/
IntDict.xml
File metadata and controls
44 lines (32 loc) · 755 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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>IntDict</name>
<category>Data</category>
<subcategory>Composite</subcategory>
<type></type>
<example>
<image></image>
<code><![CDATA[
IntDict inventory;
void setup() {
size(200, 200);
inventory = new IntDict();
inventory.set("cd", 84);
inventory.set("tapes", 15);
inventory.set("records", 102);
println(inventory);
noLoop();
fill(0);
textAlign(CENTER);
}
void draw() {
int numRecords = inventory.get("records");
text(numRecords, width/2, height/2);
}
]]></code>
</example>
<description><![CDATA[
A simple class to use a String as a lookup for an int value. String "keys" are associated with integer values.
]]></description>
<type>class</type>
</root>