Package cn.nukkit.utils.collection
Class FreezableByteArray
java.lang.Object
cn.nukkit.utils.collection.FreezableByteArray
- All Implemented Interfaces:
ArrayWrapper<Byte>
,AutoFreezable
,ByteArrayWrapper
-
Nested Class Summary
Nested classes/interfaces inherited from interface cn.nukkit.utils.collection.AutoFreezable
AutoFreezable.FreezeStatus
-
Method Summary
Modifier and TypeMethodDescriptionvoid
colder
(int temperature) this.temperature -= temperature;
带有绝对零度检查,没有沸点检查!void
强制深度冻结数组void
freeze()
强制冻结数组byte
getByte
(int index) byte[]
int
void
setByte
(int index, byte b) void
setRawBytes
(byte[] bytes) void
thaw()
void
warmer
(int temperature) this.temperature += temperature;
带有沸点检查,没有绝对零度检查!Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cn.nukkit.utils.collection.ByteArrayWrapper
get, getRawData, set, setRawData
-
Method Details
-
getManager
-
getFreezeStatus
- Specified by:
getFreezeStatus
in interfaceAutoFreezable
-
getTemperature
public int getTemperature()- Specified by:
getTemperature
in interfaceAutoFreezable
-
warmer
public void warmer(int temperature) Description copied from interface:AutoFreezable
this.temperature += temperature;
带有沸点检查,没有绝对零度检查!- Specified by:
warmer
in interfaceAutoFreezable
- Parameters:
temperature
- 温度变化量
-
colder
public void colder(int temperature) Description copied from interface:AutoFreezable
this.temperature -= temperature;
带有绝对零度检查,没有沸点检查!- Specified by:
colder
in interfaceAutoFreezable
- Parameters:
temperature
- 温度变化量
-
freeze
public void freeze()Description copied from interface:AutoFreezable
强制冻结数组- Specified by:
freeze
in interfaceAutoFreezable
-
deepFreeze
public void deepFreeze()Description copied from interface:AutoFreezable
强制深度冻结数组- Specified by:
deepFreeze
in interfaceAutoFreezable
-
thaw
public void thaw()- Specified by:
thaw
in interfaceAutoFreezable
-
getRawBytes
public byte[] getRawBytes()- Specified by:
getRawBytes
in interfaceByteArrayWrapper
-
setRawBytes
public void setRawBytes(byte[] bytes) - Specified by:
setRawBytes
in interfaceByteArrayWrapper
-
getByte
public byte getByte(int index) - Specified by:
getByte
in interfaceByteArrayWrapper
-
setByte
public void setByte(int index, byte b) - Specified by:
setByte
in interfaceByteArrayWrapper
-