Package org.eolang
Enum Ram
- java.lang.Object
-
- java.lang.Enum<Ram>
-
- org.eolang.Ram
-
- All Implemented Interfaces:
Serializable
,Comparable<Ram>
public enum Ram extends Enum<Ram>
Random access.- Since:
- 0.19
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
Ram instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
read(Phi object, int position, int length)
Read.static Ram
valueOf(String name)
Returns the enum constant of this type with the specified name.static Ram[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.void
write(Phi object, int position, byte[] bytes)
Write.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final Ram INSTANCE
Ram instance.
-
-
Method Detail
-
values
public static Ram[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Ram c : Ram.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Ram valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
read
public byte[] read(Phi object, int position, int length) throws IOException
Read.- Parameters:
object
- Owner.position
- Position.length
- Length.- Returns:
- Byte array.
- Throws:
IOException
- If fails.
-
write
public void write(Phi object, int position, byte[] bytes) throws IOException
Write.- Parameters:
object
- Owner.position
- Position to write.bytes
- Bytes to wite.- Throws:
IOException
- If fails.
-
-