javax.management.openmbean
Class SimpleType

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.management.openmbean.OpenType sample code for javax.management.openmbean.OpenType definition code for javax.management.openmbean.OpenType 
      extended by javax.management.openmbean.SimpleType
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable

public final class SimpleType
extends OpenType sample code for javax.management.openmbean.OpenType definition code for javax.management.openmbean.OpenType
implements Serializable sample code for java.io.Serializable definition code for java.io.Serializable

The SimpleType class is the open type class whose instances describe all open data values which are neither arrays, nor CompositeData sample code for javax.management.openmbean.CompositeData definition code for javax.management.openmbean.CompositeData values, nor TabularData sample code for javax.management.openmbean.TabularData definition code for javax.management.openmbean.TabularData values. It predefines all its possible instances as static fields, and has no public constructor.

Given a SimpleType instance describing values whose Java class name is className, the internal fields corresponding to the name and description of this SimpleType instance are also set to className. In other words, its methods getClassName, getTypeName and getDescription all return the same string value className.

Since:
1.5
See Also:
Serialized Form

Field Summary
static SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType BIGDECIMAL sample code for javax.management.openmbean.SimpleType.BIGDECIMAL definition code for javax.management.openmbean.SimpleType.BIGDECIMAL
          The SimpleType instance describing values whose Java class name is java.math.BigDecimal.
static SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType BIGINTEGER sample code for javax.management.openmbean.SimpleType.BIGINTEGER definition code for javax.management.openmbean.SimpleType.BIGINTEGER
          The SimpleType instance describing values whose Java class name is java.math.BigInteger.
static SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType BOOLEAN sample code for javax.management.openmbean.SimpleType.BOOLEAN definition code for javax.management.openmbean.SimpleType.BOOLEAN
          The SimpleType instance describing values whose Java class name is java.lang.Boolean.
static SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType BYTE sample code for javax.management.openmbean.SimpleType.BYTE definition code for javax.management.openmbean.SimpleType.BYTE
          The SimpleType instance describing values whose Java class name is java.lang.Byte.
static SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType CHARACTER sample code for javax.management.openmbean.SimpleType.CHARACTER definition code for javax.management.openmbean.SimpleType.CHARACTER
          The SimpleType instance describing values whose Java class name is java.lang.Character.
static SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType DATE sample code for javax.management.openmbean.SimpleType.DATE definition code for javax.management.openmbean.SimpleType.DATE
          The SimpleType instance describing values whose Java class name is java.util.Date.
static SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType DOUBLE sample code for javax.management.openmbean.SimpleType.DOUBLE definition code for javax.management.openmbean.SimpleType.DOUBLE
          The SimpleType instance describing values whose Java class name is java.lang.Double.
static SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType FLOAT sample code for javax.management.openmbean.SimpleType.FLOAT definition code for javax.management.openmbean.SimpleType.FLOAT
          The SimpleType instance describing values whose Java class name is java.lang.Float.
static SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType INTEGER sample code for javax.management.openmbean.SimpleType.INTEGER definition code for javax.management.openmbean.SimpleType.INTEGER
          The SimpleType instance describing values whose Java class name is java.lang.Integer.
static SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType LONG sample code for javax.management.openmbean.SimpleType.LONG definition code for javax.management.openmbean.SimpleType.LONG
          The SimpleType instance describing values whose Java class name is java.lang.Long.
static SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType OBJECTNAME sample code for javax.management.openmbean.SimpleType.OBJECTNAME definition code for javax.management.openmbean.SimpleType.OBJECTNAME
          The SimpleType instance describing values whose Java class name is javax.management.ObjectName.
static SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType SHORT sample code for javax.management.openmbean.SimpleType.SHORT definition code for javax.management.openmbean.SimpleType.SHORT
          The SimpleType instance describing values whose Java class name is java.lang.Short.
static SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType STRING sample code for javax.management.openmbean.SimpleType.STRING definition code for javax.management.openmbean.SimpleType.STRING
          The SimpleType instance describing values whose Java class name is java.lang.String.
static SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType VOID sample code for javax.management.openmbean.SimpleType.VOID definition code for javax.management.openmbean.SimpleType.VOID
          The SimpleType instance describing values whose Java class name is java.lang.Void.
 
Fields inherited from class javax.management.openmbean.OpenType sample code for javax.management.openmbean.OpenType definition code for javax.management.openmbean.OpenType
ALLOWED_CLASSNAMES sample code for javax.management.openmbean.OpenType.ALLOWED_CLASSNAMES definition code for javax.management.openmbean.OpenType.ALLOWED_CLASSNAMES
 
Method Summary
 boolean equals sample code for javax.management.openmbean.SimpleType.equals(java.lang.Object) definition code for javax.management.openmbean.SimpleType.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  obj)
          Compares the specified obj parameter with this SimpleType instance for equality.
 int hashCode sample code for javax.management.openmbean.SimpleType.hashCode() definition code for javax.management.openmbean.SimpleType.hashCode() ()
          Returns the hash code value for this SimpleType instance.
 boolean isValue sample code for javax.management.openmbean.SimpleType.isValue(java.lang.Object) definition code for javax.management.openmbean.SimpleType.isValue(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  obj)
          Tests whether obj is a value for this SimpleType instance.
 Object sample code for java.lang.Object definition code for java.lang.Object readResolve sample code for javax.management.openmbean.SimpleType.readResolve() definition code for javax.management.openmbean.SimpleType.readResolve() ()
          Replace an object read from an ObjectInputStream sample code for java.io.ObjectInputStream definition code for java.io.ObjectInputStream with the unique instance for that value.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.management.openmbean.SimpleType.toString() definition code for javax.management.openmbean.SimpleType.toString() ()
          Returns a string representation of this SimpleType instance.
 
Methods inherited from class javax.management.openmbean.OpenType sample code for javax.management.openmbean.OpenType definition code for javax.management.openmbean.OpenType
getClassName sample code for javax.management.openmbean.OpenType.getClassName() definition code for javax.management.openmbean.OpenType.getClassName() , getDescription sample code for javax.management.openmbean.OpenType.getDescription() definition code for javax.management.openmbean.OpenType.getDescription() , getTypeName sample code for javax.management.openmbean.OpenType.getTypeName() definition code for javax.management.openmbean.OpenType.getTypeName() , isArray sample code for javax.management.openmbean.OpenType.isArray() definition code for javax.management.openmbean.OpenType.isArray()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

VOID sample code for javax.management.openmbean.SimpleType.VOID

public static final SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType  VOID
The SimpleType instance describing values whose Java class name is java.lang.Void.


BOOLEAN sample code for javax.management.openmbean.SimpleType.BOOLEAN

public static final SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType  BOOLEAN
The SimpleType instance describing values whose Java class name is java.lang.Boolean.


CHARACTER sample code for javax.management.openmbean.SimpleType.CHARACTER

public static final SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType  CHARACTER
The SimpleType instance describing values whose Java class name is java.lang.Character.


BYTE sample code for javax.management.openmbean.SimpleType.BYTE

public static final SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType  BYTE
The SimpleType instance describing values whose Java class name is java.lang.Byte.


SHORT sample code for javax.management.openmbean.SimpleType.SHORT

public static final SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType  SHORT
The SimpleType instance describing values whose Java class name is java.lang.Short.


INTEGER sample code for javax.management.openmbean.SimpleType.INTEGER

public static final SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType  INTEGER
The SimpleType instance describing values whose Java class name is java.lang.Integer.


LONG sample code for javax.management.openmbean.SimpleType.LONG

public static final SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType  LONG
The SimpleType instance describing values whose Java class name is java.lang.Long.


FLOAT sample code for javax.management.openmbean.SimpleType.FLOAT

public static final SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType  FLOAT
The SimpleType instance describing values whose Java class name is java.lang.Float.


DOUBLE sample code for javax.management.openmbean.SimpleType.DOUBLE

public static final SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType  DOUBLE
The SimpleType instance describing values whose Java class name is java.lang.Double.


STRING sample code for javax.management.openmbean.SimpleType.STRING

public static final SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType  STRING
The SimpleType instance describing values whose Java class name is java.lang.String.


BIGDECIMAL sample code for javax.management.openmbean.SimpleType.BIGDECIMAL

public static final SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType  BIGDECIMAL
The SimpleType instance describing values whose Java class name is java.math.BigDecimal.


BIGINTEGER sample code for javax.management.openmbean.SimpleType.BIGINTEGER

public static final SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType  BIGINTEGER
The SimpleType instance describing values whose Java class name is java.math.BigInteger.


DATE sample code for javax.management.openmbean.SimpleType.DATE

public static final SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType  DATE
The SimpleType instance describing values whose Java class name is java.util.Date.


OBJECTNAME sample code for javax.management.openmbean.SimpleType.OBJECTNAME

public static final SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType  OBJECTNAME
The SimpleType instance describing values whose Java class name is javax.management.ObjectName.

Method Detail

isValue sample code for javax.management.openmbean.SimpleType.isValue(java.lang.Object) definition code for javax.management.openmbean.SimpleType.isValue(java.lang.Object)

public boolean isValue(Object sample code for java.lang.Object definition code for java.lang.Object  obj)
Tests whether obj is a value for this SimpleType instance.

This method returns true if and only if obj is not null and obj's class name is the same as the className field defined for this SimpleType instance (ie the class name returned by the getClassName sample code for javax.management.openmbean.OpenType.getClassName() definition code for javax.management.openmbean.OpenType.getClassName() method).

Specified by:
isValue sample code for javax.management.openmbean.OpenType.isValue(java.lang.Object) definition code for javax.management.openmbean.OpenType.isValue(java.lang.Object) in class OpenType sample code for javax.management.openmbean.OpenType definition code for javax.management.openmbean.OpenType
Parameters:
obj - the object to be tested.
Returns:
true if obj is a value for this SimpleType instance.

equals sample code for javax.management.openmbean.SimpleType.equals(java.lang.Object) definition code for javax.management.openmbean.SimpleType.equals(java.lang.Object)

public boolean equals(Object sample code for java.lang.Object definition code for java.lang.Object  obj)
Compares the specified obj parameter with this SimpleType instance for equality.

Two SimpleType instances are equal if and only if their getClassName sample code for javax.management.openmbean.OpenType.getClassName() definition code for javax.management.openmbean.OpenType.getClassName() methods return the same value.

Specified by:
equals sample code for javax.management.openmbean.OpenType.equals(java.lang.Object) definition code for javax.management.openmbean.OpenType.equals(java.lang.Object) in class OpenType sample code for javax.management.openmbean.OpenType definition code for javax.management.openmbean.OpenType
Parameters:
obj - the object to be compared for equality with this SimpleType instance; if obj is null or is not an instance of the class SimpleType, equals returns false.
Returns:
true if the specified object is equal to this SimpleType instance.
See Also:
Object.hashCode() sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

hashCode sample code for javax.management.openmbean.SimpleType.hashCode() definition code for javax.management.openmbean.SimpleType.hashCode()

public int hashCode()
Returns the hash code value for this SimpleType instance. The hash code of a SimpleType instance is the the hash code of the string value returned by the getClassName sample code for javax.management.openmbean.OpenType.getClassName() definition code for javax.management.openmbean.OpenType.getClassName() method.

As SimpleType instances are immutable, the hash code for this instance is calculated once, on the first call to hashCode, and then the same value is returned for subsequent calls.

Specified by:
hashCode sample code for javax.management.openmbean.OpenType.hashCode() definition code for javax.management.openmbean.OpenType.hashCode() in class OpenType sample code for javax.management.openmbean.OpenType definition code for javax.management.openmbean.OpenType
Returns:
the hash code value for this SimpleType instance
See Also:
Object.equals(java.lang.Object) sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

toString sample code for javax.management.openmbean.SimpleType.toString() definition code for javax.management.openmbean.SimpleType.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Returns a string representation of this SimpleType instance.

The string representation consists of the name of this class (ie javax.management.openmbean.SimpleType) and the type name for this instance (which is the java class name of the values this SimpleType instance represents).

As SimpleType instances are immutable, the string representation for this instance is calculated once, on the first call to toString, and then the same value is returned for subsequent calls.

Specified by:
toString sample code for javax.management.openmbean.OpenType.toString() definition code for javax.management.openmbean.OpenType.toString() in class OpenType sample code for javax.management.openmbean.OpenType definition code for javax.management.openmbean.OpenType
Returns:
a string representation of this SimpleType instance

readResolve sample code for javax.management.openmbean.SimpleType.readResolve() definition code for javax.management.openmbean.SimpleType.readResolve()

public Object sample code for java.lang.Object definition code for java.lang.Object  readResolve()
                   throws ObjectStreamException sample code for java.io.ObjectStreamException definition code for java.io.ObjectStreamException 
Replace an object read from an ObjectInputStream sample code for java.io.ObjectInputStream definition code for java.io.ObjectInputStream with the unique instance for that value.

Returns:
the replacement object.
Throws:
ObjectStreamException sample code for java.io.ObjectStreamException definition code for java.io.ObjectStreamException - if the read object cannot be resolved.