public class Megabytes
extends com.oracle.common.util.MemorySize
Megabytes
is a specialized MemorySize
whose default constructor assumes that the specified units (when a they are not specified) are measured in megabytes.
Note: This class is provided to simplify and support backwards compatibility during the injection of MemorySize
s into appropriate classes. This class is not designed for general purpose representation of capacity. For general purpose representations of memory capacity, please use the MemorySize
class.
Constructor and Description |
---|
Megabytes(int c)
Constructs a
Megabytes representing a MemorySize measured in megabytes. |
Megabytes(com.oracle.common.util.MemorySize m)
Constructs a
Megabytes based on another MemorySize . |
Megabytes(String s)
Constructs a
Megabytes representing a MemorySize measured in megabytes. |
Modifier and Type | Method and Description |
---|---|
long |
get()
Obtain the
MemorySize in megabytes. |
public Megabytes(int c)
Megabytes
representing a MemorySize
measured in megabytes.c
- the number of megabytespublic Megabytes(com.oracle.common.util.MemorySize m)
Megabytes
based on another MemorySize
.m
- the MemorySize