|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensolaris.os.dtrace.ScalarRecord
public final class ScalarRecord
A traced D primitive generated by a DTrace action such as trace() or tracemem(), or else an element in a composite
value generated by DTrace.
Immutable. Supports persistence using XMLEncoder.
| Constructor Summary | |
|---|---|
ScalarRecord(java.lang.Object v,
int nativeByteCount)
Creates a scalar record with the given DTrace primitive and the number of bytes used to store the primitive in the native DTrace buffer. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Compares the specified object with this record for equality. |
int |
getNumberOfBytes()
Gets the number of bytes used to store the primitive value of this record in the native DTrace buffer. |
java.lang.Object |
getValue()
Gets the traced D primitive value of this record. |
int |
hashCode()
Overridden to ensure that equal instances have equal hashcodes. |
java.lang.String |
toString()
Gets the natural string representation of the traced D primitive. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ScalarRecord(java.lang.Object v,
int nativeByteCount)
v - DTrace primitive data valuenativeByteCount - number of bytes used to store the given
primitive in the native DTrace buffer
java.lang.NullPointerException - if the given value is null
java.lang.IllegalArgumentException - if the given number of bytes is
not consistent with the given primitive type or is not greater
than zero
java.lang.ClassCastException - if the given value is not a DTrace
primitive type listed as a possible return value of getValue()| Method Detail |
|---|
public java.lang.Object getValue()
getValue in interface ValueRecordNumberStringpublic int getNumberOfBytes()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objecttrue if and only if the specified object is also
a ScalarRecord and the values returned by the getValue() methods of both instances are equal, false
otherwise. Values are compared using Object.equals(), unless they
are arrays of raw bytes, in which case they are compared using
Arrays.equals(byte[] a, byte[] a2).public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode() of getValue(), or Arrays.hashCode(byte[] a) if
the value is a raw byte arraypublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString() when called on
getValue(); or if the value is an array of raw bytes, a
table displaying 16 bytes per row in unsigned hex followed by the
ASCII character representations of those bytes (each unprintable
character is represented by a period (.))
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||