psdi.util

Class Message

  • java.lang.Object
    • psdi.util.Message


  • public class Message
    extends java.lang.Object
    Message is read from a message file. Format of the message line is :- Key=Message Text
    See Also:
    MessageBundle
    • Constructor Summary

      Constructors 
      Constructor and Description
      Message(java.lang.String s)
      Pass in a string that needs to be parsed to product the message class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getKey()
      Return the key of the message
      java.util.Locale getLocale() 
      java.lang.String getMessage()
      Return the actual message string
      java.lang.String getMessage(java.lang.Object arg)
      Return the message string with the specified object substituted for any place holders in the message string.
      java.lang.String getMessage(java.lang.Object[] args)
      Return the message string with the specified array of objects substituted for any place holders in the message string.
      void setLocale(java.util.Locale loc) 
      void setMessage(java.lang.String s)
      Set the message string.
      java.lang.String toString()
      Dump the contents of a message class.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Message

        public Message(java.lang.String s)
        Pass in a string that needs to be parsed to product the message class. Current format of string is key=message text.
    • Method Detail

      • getKey

        public java.lang.String getKey()
        Return the key of the message
      • getMessage

        public java.lang.String getMessage()
        Return the actual message string
      • getMessage

        public java.lang.String getMessage(java.lang.Object[] args)
        Return the message string with the specified array of objects substituted for any place holders in the message string.
      • getMessage

        public java.lang.String getMessage(java.lang.Object arg)
        Return the message string with the specified object substituted for any place holders in the message string.
      • setMessage

        public void setMessage(java.lang.String s)
        Set the message string.
      • toString

        public java.lang.String toString()
        Dump the contents of a message class. Useful for debugging
        Overrides:
        toString in class java.lang.Object
      • setLocale

        public void setLocale(java.util.Locale loc)
      • getLocale

        public java.util.Locale getLocale()