コード例 #1
0
 private void addMessage(RawMessage message) {
   if (!message.getCommand().equals(Numerics.SERVER_SUPPORT))
     throw new IllegalArgumentException("Wrong numeric: " + message.getCommand());
   RawMessage[] msgs = new RawMessage[index + 1];
   msgs[index] = message;
   for (int i = 0; i < index; i++) {
     msgs[i] = messages[i];
   }
   index++;
   messages = msgs;
 }
コード例 #2
0
 public boolean accept(RawMessage raw) {
   return raw.getCommand().equals("KICK");
 }