Class Overview
Provides a typesafe enumeration for describing units of measurement
attribute for instrumentation objects.
Summary
Fields |
public
static
final
Units |
BYTES |
Units attribute representing Bytes. |
public
static
final
Units |
EVENTS |
Units attribute representing a count of events. |
public
static
final
Units |
HERTZ |
Units attribute representing Hertz (frequency). |
public
static
final
Units |
INVALID |
An Invalid Units value. |
public
static
final
Units |
NONE |
Units attribute representing unit-less quantities. |
public
static
final
Units |
STRING |
Units attribute representing String data. |
public
static
final
Units |
TICKS |
Units attribute representing Ticks. |
Public Methods |
int
|
intValue()
Returns the integer representation of this Units attribute
|
String
|
toString()
Returns a string describing this Unit of measurement attribute
|
static
Units
|
toUnits(int value)
Maps an integer value to its corresponding Units attribute.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
Fields
public
static
final
Units
BYTES
Units attribute representing Bytes.
public
static
final
Units
EVENTS
Units attribute representing a count of events.
public
static
final
Units
HERTZ
Units attribute representing Hertz (frequency).
public
static
final
Units
INVALID
public
static
final
Units
NONE
Units attribute representing unit-less quantities.
public
static
final
Units
STRING
Units attribute representing String data. Although not really
a unit of measure, this Units value serves to distinguish String
instrumentation objects from instrumentation objects of other types.
public
static
final
Units
TICKS
Units attribute representing Ticks.
Public Methods
public
int
intValue
()
Returns the integer representation of this Units attribute
Returns
- int - an integer representation of this Units attribute.
public
String
toString
()
Returns a string describing this Unit of measurement attribute
Returns
- String - a descriptive string for this enum.
public
static
Units
toUnits
(int value)
Maps an integer value to its corresponding Units attribute.
If the integer value does not have a corresponding Units enum
value, then INVALID
is returned.
Parameters
value
| an integer representation of counter Units |
Returns
- Units - the Units object for the given
value
or INVALID
if out of range.