當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Processing IntDict.keyArray()用法及代碼示例

Processing, 類IntDict中的keyArray()用法介紹。

用法

  • .keyArray()
  • .keyArray(outgoing)

返回

  • String[]

說明

返回內部鍵數組的副本。與keys() 方法相比,可以修改此數組。

例子

IntDict inventory;

void setup() {
  size(200, 200);
  inventory = new IntDict();
  inventory.set("cd", 84);
  inventory.set("tapes", 15);
  inventory.set("records", 102);
  println(inventory); 
  String[] theKeys = inventory.keyArray();
  println(theKeys);
}

相關用法


注:本文由純淨天空篩選整理自processing.org大神的英文原創作品 IntDict.keyArray()。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。