示例#1
0
文件: User.java 项目: afik/IRC
 public List<Message> getMessage() {
   List<Message> messagesTemp = new ArrayList<>();
   Message m;
   System.out.println("Message size : " + messages.size());
   for (Message message : messages) {
     m = Message.newBuilder(message).build();
     System.out.println("Messages : " + m.getMessage());
     messagesTemp.add(m);
   }
   messages.clear();
   return messagesTemp;
 }
示例#2
0
文件: User.java 项目: afik/IRC
 public void saveMessage(Message message) {
   Message m = Message.newBuilder(message).build();
   messages.add(m);
   System.out.println("Message added");
 }