- java.lang.Object
- 
- javax.management.openmbean.OpenType<T>
- 
- javax.management.openmbean.SimpleType<T>
 
 
- 
- All Implemented Interfaces:
- Serializable
 
 public final class SimpleType<T> extends OpenType<T> TheSimpleTypeclass is the open type class whose instances describe all open data values which are neither arrays, norCompositeDatavalues, norTabularDatavalues. It predefines all its possible instances as static fields, and has no public constructor.Given a SimpleTypeinstance describing values whose Java class name is className, the internal fields corresponding to the name and description of thisSimpleTypeinstance are also set to className. In other words, its methodsgetClassName,getTypeNameandgetDescriptionall return the same string value className.- Since:
- 1.5
- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description static SimpleType<BigDecimal>BIGDECIMALTheSimpleTypeinstance describing values whose Java class name isjava.math.BigDecimal.static SimpleType<BigInteger>BIGINTEGERTheSimpleTypeinstance describing values whose Java class name isjava.math.BigInteger.static SimpleType<Boolean>BOOLEANTheSimpleTypeinstance describing values whose Java class name isjava.lang.Boolean.static SimpleType<Byte>BYTETheSimpleTypeinstance describing values whose Java class name isjava.lang.Byte.static SimpleType<Character>CHARACTERTheSimpleTypeinstance describing values whose Java class name isjava.lang.Character.static SimpleType<Date>DATETheSimpleTypeinstance describing values whose Java class name isjava.util.Date.static SimpleType<Double>DOUBLETheSimpleTypeinstance describing values whose Java class name isjava.lang.Double.static SimpleType<Float>FLOATTheSimpleTypeinstance describing values whose Java class name isjava.lang.Float.static SimpleType<Integer>INTEGERTheSimpleTypeinstance describing values whose Java class name isjava.lang.Integer.static SimpleType<Long>LONGTheSimpleTypeinstance describing values whose Java class name isjava.lang.Long.static SimpleType<ObjectName>OBJECTNAMETheSimpleTypeinstance describing values whose Java class name isjavax.management.ObjectName.static SimpleType<Short>SHORTTheSimpleTypeinstance describing values whose Java class name isjava.lang.Short.static SimpleType<String>STRINGTheSimpleTypeinstance describing values whose Java class name isjava.lang.String.static SimpleType<Void>VOIDTheSimpleTypeinstance describing values whose Java class name isjava.lang.Void.- 
Fields declared in class javax.management.openmbean.OpenTypeALLOWED_CLASSNAMES, ALLOWED_CLASSNAMES_LIST
 
- 
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Compares the specifiedobjparameter with thisSimpleTypeinstance for equality.inthashCode()Returns the hash code value for thisSimpleTypeinstance.booleanisValue(Object obj)Tests whether obj is a value for thisSimpleTypeinstance.ObjectreadResolve()Replace an object read from anObjectInputStreamwith the unique instance for that value.StringtoString()Returns a string representation of thisSimpleTypeinstance.- 
Methods declared in class javax.management.openmbean.OpenTypegetClassName, getDescription, getTypeName, isArray
 
- 
 
- 
- 
- 
Field Detail- 
VOIDpublic static final SimpleType<Void> VOID TheSimpleTypeinstance describing values whose Java class name isjava.lang.Void.
 - 
BOOLEANpublic static final SimpleType<Boolean> BOOLEAN TheSimpleTypeinstance describing values whose Java class name isjava.lang.Boolean.
 - 
CHARACTERpublic static final SimpleType<Character> CHARACTER TheSimpleTypeinstance describing values whose Java class name isjava.lang.Character.
 - 
BYTEpublic static final SimpleType<Byte> BYTE TheSimpleTypeinstance describing values whose Java class name isjava.lang.Byte.
 - 
SHORTpublic static final SimpleType<Short> SHORT TheSimpleTypeinstance describing values whose Java class name isjava.lang.Short.
 - 
INTEGERpublic static final SimpleType<Integer> INTEGER TheSimpleTypeinstance describing values whose Java class name isjava.lang.Integer.
 - 
LONGpublic static final SimpleType<Long> LONG TheSimpleTypeinstance describing values whose Java class name isjava.lang.Long.
 - 
FLOATpublic static final SimpleType<Float> FLOAT TheSimpleTypeinstance describing values whose Java class name isjava.lang.Float.
 - 
DOUBLEpublic static final SimpleType<Double> DOUBLE TheSimpleTypeinstance describing values whose Java class name isjava.lang.Double.
 - 
STRINGpublic static final SimpleType<String> STRING TheSimpleTypeinstance describing values whose Java class name isjava.lang.String.
 - 
BIGDECIMALpublic static final SimpleType<BigDecimal> BIGDECIMAL TheSimpleTypeinstance describing values whose Java class name isjava.math.BigDecimal.
 - 
BIGINTEGERpublic static final SimpleType<BigInteger> BIGINTEGER TheSimpleTypeinstance describing values whose Java class name isjava.math.BigInteger.
 - 
DATEpublic static final SimpleType<Date> DATE TheSimpleTypeinstance describing values whose Java class name isjava.util.Date.
 - 
OBJECTNAMEpublic static final SimpleType<ObjectName> OBJECTNAME TheSimpleTypeinstance describing values whose Java class name isjavax.management.ObjectName.
 
- 
 - 
Method Detail- 
isValuepublic boolean isValue(Object obj) Tests whether obj is a value for thisSimpleTypeinstance.This method returns trueif and only if obj is not null and obj's class name is the same as the className field defined for thisSimpleTypeinstance (ie the class name returned by thegetClassNamemethod).
 - 
equalspublic boolean equals(Object obj) Compares the specifiedobjparameter with thisSimpleTypeinstance for equality.Two SimpleTypeinstances are equal if and only if theirgetClassNamemethods return the same value.- Specified by:
- equalsin class- OpenType<T>
- Parameters:
- obj- the object to be compared for equality with this- SimpleTypeinstance; if obj is- nullor is not an instance of the class- SimpleType,- equalsreturns- false.
- Returns:
- trueif the specified object is equal to this- SimpleTypeinstance.
- See Also:
- Object.hashCode(),- HashMap
 
 - 
hashCodepublic int hashCode() Returns the hash code value for thisSimpleTypeinstance. The hash code of aSimpleTypeinstance is the hash code of the string value returned by thegetClassNamemethod.As SimpleTypeinstances are immutable, the hash code for this instance is calculated once, on the first call tohashCode, and then the same value is returned for subsequent calls.- Overrides:
- hashCodein class- Object
- Returns:
- the hash code value for this SimpleTypeinstance
- See Also:
- Object.equals(java.lang.Object),- System.identityHashCode(java.lang.Object)
 
 - 
toStringpublic String toString() Returns a string representation of thisSimpleTypeinstance.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 thisSimpleTypeinstance represents).As SimpleTypeinstances are immutable, the string representation for this instance is calculated once, on the first call totoString, and then the same value is returned for subsequent calls.
 - 
readResolvepublic Object readResolve() throws ObjectStreamException Replace an object read from anObjectInputStreamwith the unique instance for that value.- Returns:
- the replacement object.
- Throws:
- ObjectStreamException- if the read object cannot be resolved.
 
 
- 
 
-