< prev index next >
src/java.management/share/classes/sun/management/Sensor.java
Print this page
@@ -32,16 +32,16 @@
/**
* An abstract sensor.
*
* <p>
- * A <tt>AbstractSensor</tt> object consists of two attributes:
+ * A {@code AbstractSensor} object consists of two attributes:
* <ul>
- * <li><tt>on</tt> is a boolean flag indicating if a sensor is
+ * <li>{@code on} is a boolean flag indicating if a sensor is
* triggered. This flag will be set or cleared by the
* component that owns the sensor.</li>
- * <li><tt>count</tt> is the total number of times that a sensor
+ * <li>{@code count} is the total number of times that a sensor
* has been triggered.</li>
* </ul>
*
* @author Mandy Chung
* @since 1.5
@@ -52,11 +52,11 @@
private String name;
private long count;
private boolean on;
/**
- * Constructs a <tt>Sensor</tt> object.
+ * Constructs a {@code Sensor} object.
*
* @param name The name of this sensor.
*/
public Sensor(String name) {
this.name = name;
@@ -86,12 +86,12 @@
}
/**
* Tests if this sensor is currently on.
*
- * @return <tt>true</tt> if the sensor is currently on;
- * <tt>false</tt> otherwise.
+ * @return {@code true} if the sensor is currently on;
+ * {@code false} otherwise.
*
*/
public boolean isOn() {
synchronized (lock) {
return on;
@@ -110,11 +110,11 @@
triggerAction();
}
/**
* Triggers this sensor. This method sets this sensor on
- * and increments the count with the input <tt>increment</tt>.
+ * and increments the count with the input {@code increment}.
*/
public void trigger(int increment) {
synchronized (lock) {
on = true;
count += increment;
@@ -124,11 +124,11 @@
}
/**
* Triggers this sensor piggybacking a memory usage object.
* This method sets this sensor on
- * and increments the count with the input <tt>increment</tt>.
+ * and increments the count with the input {@code increment}.
*/
public void trigger(int increment, MemoryUsage usage) {
synchronized (lock) {
on = true;
count += increment;
@@ -148,11 +148,11 @@
}
/**
* Clears this sensor
- * and increments the count with the input <tt>increment</tt>.
+ * and increments the count with the input {@code increment}.
*/
public void clear(int increment) {
synchronized (lock) {
on = false;
count += increment;
< prev index next >