com.tivoli.twg.monitor
Class TWGMonEnumStrings

java.lang.Object
  extended bycom.tivoli.twg.monitor.TWGMonEnumStrings
All Implemented Interfaces:
java.io.Serializable

public class TWGMonEnumStrings
extends java.lang.Object
implements java.io.Serializable

A container class for attribute enumeration resource strings

See Also:
Serialized Form

Constructor Summary
TWGMonEnumStrings(IntelByteBuffer iBuf)
          This is the constructor for building the Enum Strings from an IntelByteBuffer
TWGMonEnumStrings(java.util.Locale eLocale)
          This is a constructor for the attribute enumeration container class.
TWGMonEnumStrings(StringSortSet eSet, java.util.Locale eLocale)
          This is a constructor for the attribute enumeration container class.
 
Method Summary
 void addEnumStr(java.lang.String key, java.lang.String value)
          This function will add a pair into the container class.
 java.lang.String getEnumStr(double dKey)
          This function will return an enumeration string for the specified numeric value.
 java.lang.String getEnumStr(java.lang.String key)
          This function will return an enumeration string for the specified string value.
 int getEnumStrCount()
          This function will return the number of enumeration strings in this object.
 StringSortSet getEnumStringSet()
          This function will return the complete list enumeration strings and their enumeration values.
 int getIntelByteBufferSize()
          Determines the IntelByteBuffer size requirment for the passed in Threshold version
 boolean matchesLocale(java.lang.String localeStr)
          This function will return true if the locales match.
 IntelByteBuffer writeIntelByteBuffer(IntelByteBuffer iBuf)
          Writes the class variables out to the passed in IntelByteBuffer for use in the server for persistant storage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TWGMonEnumStrings

public TWGMonEnumStrings(StringSortSet eSet,
                         java.util.Locale eLocale)
This is a constructor for the attribute enumeration container class. It provides a container for transporting a single locale of enumerated strings around.

Parameters:
eSet - set containing the enumeration strings
eLocale - of the enumeration strings

TWGMonEnumStrings

public TWGMonEnumStrings(java.util.Locale eLocale)
This is a constructor for the attribute enumeration container class. It provides a container for transporting a single locale of enumerated strings around.

Parameters:
eLocale - of the enumeration strings

TWGMonEnumStrings

public TWGMonEnumStrings(IntelByteBuffer iBuf)
                  throws TWGByteStreamException
This is the constructor for building the Enum Strings from an IntelByteBuffer

Throws:
TWGByteStreamException - thrown to indicate that the byte buffer being used build the object contained improper data
Method Detail

getIntelByteBufferSize

public int getIntelByteBufferSize()
Determines the IntelByteBuffer size requirment for the passed in Threshold version

Returns:
int size of buffer needed

writeIntelByteBuffer

public IntelByteBuffer writeIntelByteBuffer(IntelByteBuffer iBuf)
Writes the class variables out to the passed in IntelByteBuffer for use in the server for persistant storage.

Parameters:
iBuf - byte buffer to save the state of the object into
Returns:
IntelByteBuffer containing the passed in IntelByteBuffer with values set

addEnumStr

public void addEnumStr(java.lang.String key,
                       java.lang.String value)
This function will add a pair into the container class.


getEnumStr

public java.lang.String getEnumStr(java.lang.String key)
This function will return an enumeration string for the specified string value. If an enumeration value cannot be found, then a null string will be returned.

Returns:
best-fit enumeration string value or null

getEnumStr

public java.lang.String getEnumStr(double dKey)
This function will return an enumeration string for the specified numeric value. If an enumeration value cannot be found, then a null string will be returned.

Returns:
best-fit enumeration string value or null

getEnumStringSet

public StringSortSet getEnumStringSet()
This function will return the complete list enumeration strings and their enumeration values.

Returns:
StringSortSet with full enumeration string list

matchesLocale

public boolean matchesLocale(java.lang.String localeStr)
This function will return true if the locales match.

Returns:
boolean value

getEnumStrCount

public int getEnumStrCount()
This function will return the number of enumeration strings in this object.

Returns:
number of enumeration strings