Class MsgFormat


  • public class MsgFormat
    extends 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 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,
                         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​(String sSource)
        String Constructor
        Parameters:
        sSource - string to be formatted
      • MsgFormat

        public MsgFormat​(String sSource,
                         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​(String sOut)
        formatting operator.
        Parameters:
        sOut - input value to be applied to the format
      • getParm

        public 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 String sourceString()
        Retrieve the source string
        Returns:
        the source string for this
      • toString

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