Class MsgFormat


  • public class MsgFormat
    extends java.lang.Object
    Public header file for class MsgFormat: format strings -- usually messages, often used with jfExFull. MsgFormat will perform place-holder substitution (%s). Note: Where place-holder substitution must be position-dependent, use MsgFormatPos.
    • Constructor Summary

      Constructors 
      Constructor Description
      MsgFormat​(int nResId)
      Resource Id Constructor
      MsgFormat​(int nResId, java.lang.String sOut)
      Resource Id Constructor
      MsgFormat​(MsgFormat oSource)
      Copy Constructor
      MsgFormat​(java.lang.String sSource)
      String Constructor
      MsgFormat​(java.lang.String sSource, java.lang.String sOut)
      String Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      MsgFormat assign​(MsgFormat oSource)
      Assignment operator.
      MsgFormat format​(java.lang.String sOut)
      formatting operator.
      java.lang.String getParm​(int nIndex)
      Retrieve the nth parameter as a string
      int getParmCount()
      Retrieve the size of the parameter list
      int resId()
      Retrieve the resource id
      java.lang.String sourceString()
      Retrieve the source string
      java.lang.String toString()
      Conversion operator.
      • Methods inherited from class java.lang.Object

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

      • MsgFormat

        public MsgFormat​(MsgFormat oSource)
        Copy Constructor
        Parameters:
        oSource - MsgFormat to be copied
      • MsgFormat

        public MsgFormat​(int nResId)
        Resource Id Constructor
        Parameters:
        nResId - Resource Id representing a string to be formatted
      • MsgFormat

        public MsgFormat​(int nResId,
                         java.lang.String sOut)
        Resource Id Constructor
        Parameters:
        nResId - Resource Id representing a string to be formatted
        sOut - input value to be applied to the format
      • MsgFormat

        public MsgFormat​(java.lang.String sSource)
        String Constructor
        Parameters:
        sSource - string to be formatted
      • MsgFormat

        public MsgFormat​(java.lang.String sSource,
                         java.lang.String sOut)
        String Constructor
        Parameters:
        sSource - string to be formatted
        sOut - input value to be applied to the format
    • Method Detail

      • assign

        public MsgFormat assign​(MsgFormat oSource)
        Assignment operator.
        Parameters:
        oSource - MsgFormat to be copied
      • format

        public MsgFormat format​(java.lang.String sOut)
        formatting operator.
        Parameters:
        sOut - input value to be applied to the format
      • getParm

        public java.lang.String getParm​(int nIndex)
        Retrieve the nth parameter as a string
        Returns:
        the nth parameter as a string
      • getParmCount

        public int getParmCount()
        Retrieve the size of the parameter list
        Returns:
        the size of the parameter list
      • resId

        public int resId()
        Retrieve the resource id
        Returns:
        the resource id for this
      • sourceString

        public java.lang.String sourceString()
        Retrieve the source string
        Returns:
        the source string for this
      • toString

        public java.lang.String toString()
        Conversion operator.
        Overrides:
        toString in class java.lang.Object
        Returns:
        *this as a jfstring