Package zombie.radio.devices
Class DevicePresets
java.lang.Object
zombie.radio.devices.DevicePresets
- All Implemented Interfaces:
java.lang.Cloneable
public class DevicePresets
extends java.lang.Object
implements java.lang.Cloneable
-
Field Summary
Fields Modifier and Type Field Description protected int
maxPresets
protected java.util.ArrayList
presets
-
Constructor Summary
Constructors Constructor Description DevicePresets()
-
Method Summary
Modifier and Type Method Description void
addPreset(java.lang.String name, int frequency)
void
clearPresets()
protected java.lang.Object
clone()
int
getMaxPresets()
int
getPresetFreq(int id)
java.lang.String
getPresetName(int id)
java.util.ArrayList
getPresets()
KahluaTable
getPresetsLua()
void
load(java.nio.ByteBuffer input, int WorldVersion, boolean net)
void
removePreset(int id)
void
save(java.nio.ByteBuffer output, boolean net)
void
setMaxPresets(int m)
void
setPreset(int id, java.lang.String name, int frequency)
void
setPresetFreq(int id, int frequency)
void
setPresetName(int id, java.lang.String name)
void
setPresets(java.util.ArrayList p)
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
maxPresets
protected int maxPresets -
presets
protected java.util.ArrayList presets
-
-
Constructor Details
-
DevicePresets
public DevicePresets()
-
-
Method Details
-
clone
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException- Overrides:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
-
getPresetsLua
-
getPresets
public java.util.ArrayList getPresets() -
setPresets
public void setPresets(java.util.ArrayList p) -
getMaxPresets
public int getMaxPresets() -
setMaxPresets
public void setMaxPresets(int m) -
addPreset
public void addPreset(java.lang.String name, int frequency) -
removePreset
public void removePreset(int id) -
getPresetName
public java.lang.String getPresetName(int id) -
getPresetFreq
public int getPresetFreq(int id) -
setPresetName
public void setPresetName(int id, java.lang.String name) -
setPresetFreq
public void setPresetFreq(int id, int frequency) -
setPreset
public void setPreset(int id, java.lang.String name, int frequency) -
clearPresets
public void clearPresets() -
save
public void save(java.nio.ByteBuffer output, boolean net) throws java.io.IOException- Throws:
java.io.IOException
-
load
public void load(java.nio.ByteBuffer input, int WorldVersion, boolean net) throws java.io.IOException- Throws:
java.io.IOException
-