mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 18:35:37 +01:00
add hasKey() methods
This commit is contained in:
@@ -246,6 +246,11 @@ public class FloatDict {
|
||||
}
|
||||
|
||||
|
||||
public boolean hasKey(String key) {
|
||||
return index(key) != -1;
|
||||
}
|
||||
|
||||
|
||||
// /** Increase the value of a specific key by 1. */
|
||||
// public void inc(String key) {
|
||||
// inc(key, 1);
|
||||
|
||||
@@ -235,6 +235,11 @@ public class IntDict {
|
||||
}
|
||||
|
||||
|
||||
public boolean hasKey(String key) {
|
||||
return index(key) != -1;
|
||||
}
|
||||
|
||||
|
||||
/** Increase the value of a specific key by 1. */
|
||||
public void increment(String key) {
|
||||
add(key, 1);
|
||||
|
||||
@@ -215,6 +215,11 @@ public class StringDict {
|
||||
}
|
||||
|
||||
|
||||
public boolean hasKey(String key) {
|
||||
return index(key) != -1;
|
||||
}
|
||||
|
||||
|
||||
protected void create(String key, String value) {
|
||||
if (count == keys.length) {
|
||||
keys = PApplet.expand(keys);
|
||||
|
||||
Reference in New Issue
Block a user