Package io.atomix.utils.memory
Class MemorySize
- java.lang.Object
-
- io.atomix.utils.memory.MemorySize
-
public class MemorySize extends Object
Memory size.
-
-
Constructor Summary
Constructors Constructor Description MemorySize(long bytes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longbytes()Returns the number of bytes.booleanequals(Object object)static MemorySizefrom(long bytes)Creates a memory size from the given bytes.inthashCode()StringtoString()
-
-
-
Method Detail
-
from
public static MemorySize from(long bytes)
Creates a memory size from the given bytes.- Parameters:
bytes- the number of bytes- Returns:
- the memory size
-
bytes
public long bytes()
Returns the number of bytes.- Returns:
- the number of bytes
-
-