public class IRPeripherals extends java.util.ArrayList<IRPeripheral>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PREFS_KEY |
static java.lang.String |
TAG |
Constructor and Description |
---|
IRPeripherals() |
Modifier and Type | Method and Description |
---|---|
IRPeripheral |
addPeripheral(java.lang.String hostname)
hostnameからIRPeripheralインスタンスを作成して追加します。
Create new IRPeripheral instance from hostname then add it.
|
IRPeripheral |
getPeripheral(java.lang.String name)
hostnameが一致するIRPeripheralを返します。 大文字小文字に関係なくマッチします。 |
IRPeripheral |
getPeripheralByDeviceId(java.lang.String deviceId)
deviceidが一致するIRPeripheralを返します。
Return IRPeripheral that matches deviceId.
|
void |
load()
SharedPreferencesからこのインスタンスにデータを読み込みます。
Load data from SharedPreferences into this instance.
|
void |
save()
SharedPreferencesにデータを保存します。
Save data to SharedPreferences.
|
org.json.JSONArray |
toJSONArray()
JSONArrayに変換したものを返します。
Return JSONArray representation.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
public static final java.lang.String TAG
public static final java.lang.String PREFS_KEY
public IRPeripheral addPeripheral(java.lang.String hostname)
hostname
- IRKitデバイスのホスト名。 Hostname of IRKit device.public IRPeripheral getPeripheralByDeviceId(java.lang.String deviceId)
deviceId
- deviceidpublic IRPeripheral getPeripheral(java.lang.String name)
hostnameが一致するIRPeripheralを返します。 大文字小文字に関係なくマッチします。
Return IRPeripheral that matches hostname. It will perform case-insensitive match.
name
- hostnamepublic void save()
public void load()
public org.json.JSONArray toJSONArray()