예제 #1
0
 public static ArrayList<Message> allOutgoingMessages(Thing thing) {
   ArrayList<Message> result = new ArrayList<Message>();
   for (Port p : allPorts(thing)) {
     for (Message m : p.getSends()) {
       if (!result.contains(m)) result.add(m);
     }
   }
   return result;
 }
예제 #2
0
 public static ArrayList<Message> findOutgoingMessage(Port port, String name, boolean fuzzy) {
   ArrayList<Message> result = new ArrayList<Message>();
   for (Message t : port.getSends()) {
     if (t.getName().startsWith(name)) {
       if (fuzzy) result.add(t);
       else if (t.getName().equals(name)) result.add(t);
     }
   }
   return result;
 }