|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.mat.query.Bytes
public final class Bytes
Logical representation of a number of bytes. This class is immutable, so operations such as add will return new instances.
Constructor Summary | |
---|---|
Bytes(long bytes)
Create an immutable instance of a logical representation of a number of bytes . |
Method Summary | |
---|---|
Bytes |
add(long add)
Add a number of bytes to the current value from getValue() and
return a new instance of Bytes . |
int |
compareTo(Object y)
If comparing to another instances of Bytes ,
compare the values returned by getValue() . |
boolean |
equals(Object o)
If comparing to another instances of Bytes ,
return true if the results of getValue() are the same. |
long |
getValue()
Get the underlying number of bytes as a long. |
int |
hashCode()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Bytes(long bytes)
bytes
.
bytes
- The number of bytes to represent.Method Detail |
---|
public long getValue()
public String toString()
toString
in class Object
Long.toString()
public int hashCode()
hashCode
in class Object
Long.hashCode()
public boolean equals(Object o)
Bytes
,
return true if the results of getValue()
are the same.
equals
in class Object
public Bytes add(long add)
getValue()
and
return a new instance of Bytes
.
add
- The amount of bytes to add.
Bytes
with the
previous value summed with add
.public int compareTo(Object y)
Bytes
,
compare the values returned by getValue()
.
compareTo
in interface Comparable<Object>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |