Class MessageType

    • Constructor Detail

      • MessageType

        public MessageType​(IntegerID id)
        Creates a new MessageType object.
      • MessageType

        public MessageType​(IntegerID id,
                           java.lang.String pattern)
        Creates a new MessageType object.
    • Method Detail

      • setPattern

        public void setPattern​(java.lang.String pattern)
        DOCUMENT-ME
      • getPattern

        public java.lang.String getPattern()
        DOCUMENT-ME
      • setSection

        public void setSection​(java.lang.String section)
        Sets the name of the category of messages this message type belongs to.
      • getSection

        public java.lang.String getSection()
        Returns the name of the category of messages this message type belongs to.
      • merge

        public static void merge​(GameData curGD,
                                 MessageType curMsgType,
                                 GameData newGD,
                                 MessageType newMsgType)
        Transfers all available information from the current message type to the new one.
        Parameters:
        curGD - fully loaded game data
        curMsgType - a fully initialized and valid message type
        newGD - the game data to be updated
        newMsgType - an uninitialized message type to be updated with the date from curMsgType
      • setGameData

        public void setGameData​(GameData data)
        Set the GameData were this message type belongs to this is required to render messages of this type
        Parameters:
        data - The GameData
      • getGameData

        public GameData getGameData()
        Returns the GameData were this msgtype belongs to. this is required to render messages of this type
        Returns:
        the GameData
      • getLocale

        public java.util.Locale getLocale()
        Get the Locale of the MessageType.
        Specified by:
        getLocale in interface Localized
        Returns:
        the locale of the MessageType.
        See Also:
        Localized.getLocale()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object