Class MsgUtil


  • public class MsgUtil
    extends java.lang.Object
    Since:
    2018-02-21
    • Constructor Summary

      Constructors 
      Constructor Description
      MsgUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int getGCMsg​(int msg)
      Strips off the protobuf message flag and returns an EMsg.
      static EMsg getMsg​(int msg)
      Strips off the protobuf message flag and returns an EMsg.
      static boolean isProtoBuf​(int msg)
      Determines whether message is protobuf flagged.
      static int makeGCMsg​(int msg, boolean protobuf)
      Crafts an EMsg, flagging it if required.
      static int makeMsg​(int msg, boolean protobuf)
      Crafts an EMsg, flagging it if required.
      • Methods inherited from class java.lang.Object

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

      • MsgUtil

        public MsgUtil()
    • Method Detail

      • getMsg

        public static EMsg getMsg​(int msg)
        Strips off the protobuf message flag and returns an EMsg.
        Parameters:
        msg - The message number.
        Returns:
        The underlying EMsg.
      • getGCMsg

        public static int getGCMsg​(int msg)
        Strips off the protobuf message flag and returns an EMsg.
        Parameters:
        msg - The message number.
        Returns:
        The underlying EMsg.
      • makeMsg

        public static int makeMsg​(int msg,
                                  boolean protobuf)
        Crafts an EMsg, flagging it if required.
        Parameters:
        msg - The EMsg to flag.
        protobuf - if set to true, the message is protobuf flagged.
        Returns:
        A crafted EMsg, flagged if requested.
      • makeGCMsg

        public static int makeGCMsg​(int msg,
                                    boolean protobuf)
        Crafts an EMsg, flagging it if required.
        Parameters:
        msg - The EMsg to flag.
        protobuf - if set to true, the message is protobuf flagged.
        Returns:
        A crafted EMsg, flagged if requested
      • isProtoBuf

        public static boolean isProtoBuf​(int msg)
        Determines whether message is protobuf flagged.
        Parameters:
        msg - The message.
        Returns:
        true if this message is protobuf flagged; otherwise, false.