public class MemorySize extends java.lang.Object implements java.lang.Comparable<MemorySize>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
Bytes
The unit string "B".
|
Modifier and Type | Method and Description |
---|---|
static MemorySize |
bytes(long size)
Constructs a number-of-bytes instance directly.
|
int |
compareTo(MemorySize other) |
boolean |
equals(java.lang.Object o) |
long |
getSize() |
static MemorySize |
gibiBytes(long size)
Constructs a number-of-gibibytes instance directly.
|
int |
hashCode() |
static MemorySize |
kibiBytes(long size)
Constructs a number-of-kibibytes instance directly.
|
static MemorySize |
mebiBytes(long size)
Constructs a number-of-mebibytes instance directly.
|
static MemorySize |
parse(java.lang.String value)
Parses a string to obtain a memory size.
|
static MemorySize |
pebiBytes(long size)
Constructs a number-of-pebibytes instance directly.
|
static MemorySize |
tebiBytes(long size)
Constructs a number-of-tebibytes instance directly.
|
java.lang.String |
toString() |
public static final java.lang.String Bytes
public static MemorySize bytes(long size)
public static MemorySize kibiBytes(long size)
public static MemorySize mebiBytes(long size)
public static MemorySize gibiBytes(long size)
public static MemorySize tebiBytes(long size)
public static MemorySize pebiBytes(long size)
public static MemorySize parse(java.lang.String value)
public long getSize()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(MemorySize other)
compareTo
in interface java.lang.Comparable<MemorySize>