com.sun.jaw.snmp.common
Class SnmpTimeticks
java.lang.Object
|
+--com.sun.jaw.snmp.common.SnmpValue
|
+--com.sun.jaw.snmp.common.SnmpInt
|
+--com.sun.jaw.snmp.common.SnmpUnsignedInt
|
+--com.sun.jaw.snmp.common.SnmpTimeticks
- public class SnmpTimeticks
- extends SnmpUnsignedInt
This class contains a SnmpTimeTick value which
has units of 1/100th of a second.
- See Also:
- Serialized Form
| Fields inherited from class com.sun.jaw.snmp.common.SnmpInt |
value |
|
Constructor Summary |
SnmpTimeticks(int v)
Constructs a new SnmpTimeticks from the specified integer value. |
SnmpTimeticks(java.lang.Integer v)
Constructs a new SnmpTimeticks from the specified Integer value. |
SnmpTimeticks(long v)
Constructs a new SnmpTimeticks from the specified long value. |
SnmpTimeticks(java.lang.Long v)
Constructs a new SnmpTimeticks from the specified Long value. |
|
Method Summary |
java.lang.String |
getTypeName()
Returns a textual description of the type object. |
static java.lang.String |
printTimeTicks(long timeticks)
Parses the specified long value with time units and
returns a String of the form d days hh:mm:ss. |
java.lang.String |
toString()
Converts the timeticks value to its String form. |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
SnmpTimeticks
public SnmpTimeticks(int v)
throws java.lang.IllegalArgumentException
- Constructs a new
SnmpTimeticks from the specified integer value.
- Parameters:
v - The initialization value.- Throws:
- java.lang.IllegalArgumentException - The specified value is negative
or larger than
SnmpUnsignedInt.MAX_VALUE.
SnmpTimeticks
public SnmpTimeticks(java.lang.Integer v)
throws java.lang.IllegalArgumentException
- Constructs a new
SnmpTimeticks from the specified Integer value.
- Parameters:
v - The initialization value.- Throws:
- java.lang.IllegalArgumentException - The specified value is negative
or larger than
SnmpUnsignedInt.MAX_VALUE.
SnmpTimeticks
public SnmpTimeticks(long v)
throws java.lang.IllegalArgumentException
- Constructs a new
SnmpTimeticks from the specified long value.
- Parameters:
v - The initialization value.- Throws:
- java.lang.IllegalArgumentException - The specified value is negative
or larger than
SnmpUnsignedInt.MAX_VALUE.
SnmpTimeticks
public SnmpTimeticks(java.lang.Long v)
throws java.lang.IllegalArgumentException
- Constructs a new
SnmpTimeticks from the specified Long value.
- Parameters:
v - The initialization value.- Throws:
- java.lang.IllegalArgumentException - The specified value is negative
or larger than
SnmpUnsignedInt.MAX_VALUE.
printTimeTicks
public static final java.lang.String printTimeTicks(long timeticks)
- Parses the specified long value with time units and
returns a
String of the form d days hh:mm:ss.
- Parameters:
timeticks - The value to be parsed.- Returns:
- The
String representation of the value.
toString
public final java.lang.String toString()
- Converts the timeticks value to its
String form.
The format of the returned String is d days hh:mm:ss.
Note: this method simply calls the printTimeTicks method.
- Returns:
- The
String representation of the value. - Overrides:
- toString in class SnmpInt
getTypeName
public final java.lang.String getTypeName()
- Returns a textual description of the type object.
- Returns:
- ASN.1 textual description.
- Overrides:
- getTypeName in class SnmpUnsignedInt