|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensolaris.os.dtrace.PrintfRecord
public final class PrintfRecord
A formatted string generated by the DTrace printf()
action.
Immutable. Supports persistence using XMLEncoder
.
Constructor Summary | |
---|---|
PrintfRecord(java.util.List<ValueRecord> v,
java.lang.String s)
Creates a record with the unformatted elements passed to the DTrace printf() action and the resulting formatted
output. |
Method Summary | |
---|---|
int |
compareTo(PrintfRecord r)
Compares the formatted string value of this record with that of the given record. |
boolean |
equals(java.lang.Object o)
Compares the specified object with this PrintfRecord for
equality. |
java.lang.String |
getFormattedString()
Gets the formatted string output of the DTrace printf()
action. |
ValueRecord |
getRecord(int i)
Gets the unformatted element passed to the DTrace printf() action at the given offset in the printf()
argument list after the format string, starting at offset zero
for the first unformatted element. |
int |
getRecordCount()
Gets the number of DTrace printf() unformatted elements
(arguments following the format string). |
java.util.List<ValueRecord> |
getRecords()
Gets the unfomatted elements passed to the DTrace printf() action after the format string. |
int |
hashCode()
Overridden to ensure that equal instances have equal hash codes. |
java.lang.String |
toString()
Gets the formatted string output of the DTrace printf()
action. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PrintfRecord(java.util.List<ValueRecord> v, java.lang.String s)
printf()
action and the resulting formatted
output. Supports XML persistence.
v
- variable number of unformatted elements passed to the
DTrace printf()
actions
- formatted printf()
output
java.lang.NullPointerException
- if the given list or any of its
elements is null
, or if the given formatted string is
null
Method Detail |
---|
public java.lang.String getFormattedString()
printf()
action.
printf()
actionpublic java.util.List<ValueRecord> getRecords()
printf()
action after the format string.
printf()
action that generated this
record, in the order they appear in the argument list after the
format stringpublic int getRecordCount()
printf()
unformatted elements
(arguments following the format string). For example, the
following action
printf("%s %d\n", "cat", 9);
generates a PrintfRecord
with a record count of two.
printf()
action that generated this record.public ValueRecord getRecord(int i)
printf()
action at the given offset in the printf()
argument list after the format string, starting at offset zero
for the first unformatted element.
printf()
element at the given index (using the same order that
they appear in the printf()
argument list)
java.lang.ArrayIndexOutOfBoundsException
- if the given index is
out of range (index < 0 || index >= getRecordCount())public boolean equals(java.lang.Object o)
PrintfRecord
for
equality. Returns true
if and only if the specified
object is also a PrintfRecord
and both records have the
same formatted string and underlying data elements.
equals
in class java.lang.Object
true
if and only if the specified object is also
a PrintfRecord
and both the formatted strings and
the underlying data elements of both records are equalpublic int hashCode()
hashCode
in class java.lang.Object
public int compareTo(PrintfRecord r)
printf
records by
their string values is incompatible with equals()
, which also checks the underlying data elements for
equality.
compareTo
in interface java.lang.Comparable<PrintfRecord>
public java.lang.String toString()
printf()
action.
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |