Back to project page socket.io-android-chat.
The source code is released under:
MIT License
If you think the Android project socket.io-android-chat listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.github.nkzawa.socketio.androidchat; /* ww w . ja va2 s .c o m*/ public class Message { public static final int TYPE_MESSAGE = 0; public static final int TYPE_LOG = 1; public static final int TYPE_ACTION = 2; private int mType; private String mMessage; private String mUsername; private Message() {} public int getType() { return mType; }; public String getMessage() { return mMessage; }; public String getUsername() { return mUsername; }; public static class Builder { private final int mType; private String mUsername; private String mMessage; public Builder(int type) { mType = type; } public Builder username(String username) { mUsername = username; return this; } public Builder message(String message) { mMessage = message; return this; } public Message build() { Message message = new Message(); message.mType = mType; message.mUsername = mUsername; message.mMessage = mMessage; return message; } } }