com.ibm.wsspi.rasdiag
Class DiagnosticTypedValue
- java.lang.Object
com.ibm.wsspi.rasdiag.DiagnosticTypedValue
- public class DiagnosticTypedValue
- extends java.lang.Object
- String
- HashMap (to recursively cascade Diagnostic Data)
- DiagnosticTypedValue which can be of type:
- short
- int
- boolean
- double
- long
- String
- Date
Field Summary
Modifier and Type | Field and Description |
---|---|
|
MAXTYPECONST
|
|
sTypeNames
|
|
tvMsgKey
localization message key representing the label for this value
|
|
tvString
string representation of value
|
|
tvType
type being held in this DTV object
|
|
TYPEBOOLEAN
boolean primitive type
|
|
TYPECOLLECTIONEL
Collection type
|
|
TYPEDATE
Date type
|
|
TYPEDOUBLE
double primitive type
|
|
TYPEINT
int primitive type
|
|
TYPELONG
long primitive type
|
|
TYPESHORT
short primitive type
|
|
TYPESTRING
String type
|
Constructor Summary
Constructor and Description |
---|
DiagnosticTypedValue()
constructs the class with no parms.
|
DiagnosticTypedValue(boolean aBoolVal,java.lang.String aMsgKey)
constructs an object with a boolean value (Helper constructor)
|
DiagnosticTypedValue(java.util.Date aDateVal,java.lang.String aMsgKey)
constructs an object with a date object (Helper constructor)
|
DiagnosticTypedValue(double aDoubleVal,java.lang.String aMsgKey)
constructs an object with a dobule value (Helper constructor)
|
DiagnosticTypedValue(int aIntVal,java.lang.String aMsgKey)
constructs an object with an int value (Helper constructor)
|
DiagnosticTypedValue(long aLongVal,java.lang.String aMsgKey)
constructs an object with a long value (Helper constructor)
|
DiagnosticTypedValue(short aShortVal,java.lang.String aMsgKey)
constructs an object with a short value (Helper constructor)
|
DiagnosticTypedValue(java.lang.String aStringVal,java.lang.String aMsgKey)
constructs an object with a String value (Helper constructor)
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
addCollectionToHashMap(java.util.HashMap aDest,java.lang.String aId,java.util.Collection aData,java.lang.String aMsgKey)
adds a collection into the passed in HashMap.
|
|
addCollectionToHashMap(java.util.HashMap aDest,java.lang.String aId,java.util.Collection aData,java.lang.String aMsgKey,short collectionType)
adds a collection into the passed in HashMap.
|
|
addHashMap(java.util.HashMap parentHashMap,java.util.HashMap childHashMap,java.lang.String childName)
add a child Hashmap to a parent Hashmap and give it a name (static Helper method)
This is equivalent to calling parentHashMap.put(childName, childHashMap)
|
|
fromString(java.lang.String aDiagType)
deserialize a string back into this object
|
|
toString()
convert the object to a string with a colon separated type:value pair
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail
TYPESHORT
- public static final short TYPESHORT
short primitive type
See Also:
TYPEINT
- public static final short TYPEINT
int primitive type
See Also:
TYPEBOOLEAN
- public static final short TYPEBOOLEAN
boolean primitive type
See Also:
TYPEDOUBLE
- public static final short TYPEDOUBLE
double primitive type
See Also:
TYPELONG
- public static final short TYPELONG
long primitive type
See Also:
TYPESTRING
- public static final short TYPESTRING
String type
See Also:
TYPEDATE
- public static final short TYPEDATE
Date type
See Also:
TYPECOLLECTIONEL
- public static final short TYPECOLLECTIONEL
Collection type
See Also:
MAXTYPECONST
- public static final short MAXTYPECONST
See Also:
sTypeNames
- public static final java.lang.String[] sTypeNames
tvType
- public short tvType
type being held in this DTV object
tvString
- public java.lang.String tvString
string representation of value
tvMsgKey
- public java.lang.String tvMsgKey
localization message key representing the label for this value
Constructor Detail
DiagnosticTypedValue
- public DiagnosticTypedValue()
constructs the class with no parms. Since member fields are public, they can be updated
directly. This allows construction by the caller
DiagnosticTypedValue
- public DiagnosticTypedValue(short aShortVal,
- java.lang.String aMsgKey)
constructs an object with a short value (Helper constructor)
Parameters:
aShortVal
- value to be typed/stored DiagnosticTypedValue
- public DiagnosticTypedValue(int aIntVal,
- java.lang.String aMsgKey)
constructs an object with an int value (Helper constructor)
Parameters:
aIntVal
- value to be typed/stored DiagnosticTypedValue
- public DiagnosticTypedValue(boolean aBoolVal,
- java.lang.String aMsgKey)
constructs an object with a boolean value (Helper constructor)
Parameters:
aBoolVal
- value to be typed/stored DiagnosticTypedValue
- public DiagnosticTypedValue(double aDoubleVal,
- java.lang.String aMsgKey)
constructs an object with a dobule value (Helper constructor)
Parameters:
aDoubleVal
- value to be typed/stored DiagnosticTypedValue
- public DiagnosticTypedValue(long aLongVal,
- java.lang.String aMsgKey)
constructs an object with a long value (Helper constructor)
Parameters:
aLongVal
- value to be typed/stored DiagnosticTypedValue
- public DiagnosticTypedValue(java.lang.String aStringVal,
- java.lang.String aMsgKey)
constructs an object with a String value (Helper constructor)
Parameters:
aStringVal
- value to be typed/stored DiagnosticTypedValue
- public DiagnosticTypedValue(java.util.Date aDateVal,
- java.lang.String aMsgKey)
constructs an object with a date object (Helper constructor)
Parameters:
aDateVal
- value to be typed/stored Method Detail
toString
- public java.lang.String toString( )
convert the object to a string with a colon separated type:value pair
Overrides:
toString
in class java.lang.Object
Returns:
String representing the object. If tvType is invalid, returns null.
fromString
- public static DiagnosticTypedValue fromString( java.lang.String aDiagType)
deserialize a string back into this object
Parameters:
aDiagType
- String representation of the object (from toString()) Returns:
DiagnosticTypedValue instance from the string
addCollectionToHashMap
- public static void addCollectionToHashMap( java.util.HashMap aDest,
- java.lang.String aId,
- java.util.Collection aData,
- java.lang.String aMsgKey)
adds a collection into the passed in HashMap. It creates multiple
DiagnosticTypedValue
entries in the HashMap
with the id suffixed by a sequence number. The same MsgKey is used for all as they are
assumed to be the same type of data.
Parameters:
aDest
- Destination HashMap into which all of the entries in the collection will be added aId
- Id/Name of the collection which will be suffixed by a sequence number and used as
the HashMap key
collection as the type of data which is stored in the DiagnosticTypedValue
aData
- Actual collection containing the data (or something subclassed off of collection) aMsgKey
- Key into a Resource Bundle for localizing the label addCollectionToHashMap
- public static void addCollectionToHashMap( java.util.HashMap aDest,
- java.lang.String aId,
- java.util.Collection aData,
- java.lang.String aMsgKey,
- short collectionType)
adds a collection into the passed in HashMap. It creates multiple
DiagnosticTypedValue
entries in the HashMap
with the id suffixed by a sequence number. The same MsgKey is used for all as they are
assumed to be the same type of data.
Parameters:
aDest
- Destination HashMap into which all of the entries in the collection will be added aId
- Id/Name of the collection which will be suffixed by a sequence number and used as
the HashMap key
collection as the type of data which is stored in the DiagnosticTypedValue
aData
- Actual collection containing the data (or something subclassed off of collection) aMsgKey
- Key into a Resource Bundle for localizing the label collectionType
- the type of each object in the collection (should be specified from the
TYPE* constants in this file). If not valid, String will be used. addHashMap
- public static void addHashMap(java.util.HashMap parentHashMap,
- java.util.HashMap childHashMap,
- java.lang.String childName)
add a child Hashmap to a parent Hashmap and give it a name (static Helper method)
This is equivalent to calling parentHashMap.put(childName, childHashMap)
Parameters:
parentHashMap
- Parent HashMap, will contain Child HashMap childHashMap
- Child HashMap to embed into Parent HashMap childName
- Name of Child HashMap for display