com.sun.management.snmp
Class SnmpNull

java.lang.Object
  extended by com.sun.management.snmp.SnmpValue
      extended by com.sun.management.snmp.SnmpNull
All Implemented Interfaces:
SnmpDataTypeEnums, Serializable, Cloneable

public class SnmpNull
extends SnmpValue

Represents an SNMP null value.

Since:
Java DMK 5.1
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.sun.management.snmp.SnmpDataTypeEnums
ApplFlag, BitStringTag, BooleanTag, Counter64Tag, CounterTag, CtxtFlag, errEndOfMibViewTag, errNoSuchInstanceTag, errNoSuchObjectTag, GaugeTag, IntegerTag, IpAddressTag, NsapTag, NullTag, ObjectIdentiferTag, ObjectIdentifierTag, OctetStringTag, OpaqueTag, SequenceTag, TableTag, TimeticksTag, UintegerTag, UnknownSyntaxTag
 
Constructor Summary
SnmpNull()
          Constructs a new SnmpNull.
SnmpNull(int t)
          Constructs a new SnmpNull from the specified tag value.
SnmpNull(String dummy)
          Constructs a new SnmpNull.
 
Method Summary
 Object clone()
          Clones the SnmpNull object, making a copy of its data.
 SnmpValue duplicate()
          Performs a clone action.
 int getTag()
          Returns the tag value of this SnmpNull.
 String getTypeName()
          Returns a textual description of the type object.
 boolean isEndOfMibViewValue()
          Checks if this SnmpNull object corresponds to an endOfMibView value.
 boolean isNoSuchInstanceValue()
          Checks if this SnmpNull object corresponds to a noSuchInstance value.
 boolean isNoSuchObjectValue()
          Checks if this SnmpNull object corresponds to a noSuchObject value.
 SnmpOid toOid()
          Converts the NULL value to its SnmpOid form.
 String toString()
          Converts the NULL value to its ASN.1 String form.
 
Methods inherited from class com.sun.management.snmp.SnmpValue
toAsn1String
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SnmpNull

public SnmpNull()
Constructs a new SnmpNull.


SnmpNull

public SnmpNull(String dummy)
Constructs a new SnmpNull.
For mibgen private use only.


SnmpNull

public SnmpNull(int t)
Constructs a new SnmpNull from the specified tag value.

Parameters:
t - The initialization value.
Method Detail

getTag

public int getTag()
Returns the tag value of this SnmpNull.

Returns:
The value.

toString

public String toString()
Converts the NULL value to its ASN.1 String form. When the tag is not the universal one, it is prepended to the String form.

Overrides:
toString in class Object
Returns:
The String representation of the value.

toOid

public SnmpOid toOid()
Converts the NULL value to its SnmpOid form. Normally, a NULL value cannot be used as an index value, this method triggers an exception.

Specified by:
toOid in class SnmpValue
Returns:
The OID representation of the value.

duplicate

public final SnmpValue duplicate()
Performs a clone action. This provides a workaround for the SnmpValue interface.

Specified by:
duplicate in class SnmpValue
Returns:
The SnmpValue clone.

clone

public final Object clone()
Clones the SnmpNull object, making a copy of its data.

Overrides:
clone in class Object
Returns:
The object clone.

getTypeName

public final String getTypeName()
Returns a textual description of the type object.

Specified by:
getTypeName in class SnmpValue
Returns:
ASN.1 textual description.

isNoSuchObjectValue

public boolean isNoSuchObjectValue()
Checks if this SnmpNull object corresponds to a noSuchObject value.

Overrides:
isNoSuchObjectValue in class SnmpValue
Returns:
true if the tag equals SnmpDataTypeEnums.errNoSuchObjectTag, false otherwise.

isNoSuchInstanceValue

public boolean isNoSuchInstanceValue()
Checks if this SnmpNull object corresponds to a noSuchInstance value.

Overrides:
isNoSuchInstanceValue in class SnmpValue
Returns:
true if the tag equals SnmpDataTypeEnums.errNoSuchInstanceTag, false otherwise.

isEndOfMibViewValue

public boolean isEndOfMibViewValue()
Checks if this SnmpNull object corresponds to an endOfMibView value.

Overrides:
isEndOfMibViewValue in class SnmpValue
Returns:
true if the tag equals SnmpDataTypeEnums.errEndOfMibViewTag, false otherwise.

Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

Copyright 1998-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.