Esempio n. 1
0
 public static ArrayList<Message> allIncomingMessages(Thing thing) {
   ArrayList<Message> result = new ArrayList<Message>();
   for (Port p : allPorts(thing)) {
     for (Message m : p.getReceives()) {
       if (!result.contains(m)) result.add(m);
     }
   }
   return result;
 }
Esempio n. 2
0
 public static ArrayList<Message> findIncomingMessage(Port port, String name, boolean fuzzy) {
   ArrayList<Message> result = new ArrayList<Message>();
   for (Message t : port.getReceives()) {
     if (t.getName().startsWith(name)) {
       if (fuzzy) result.add(t);
       else if (t.getName().equals(name)) result.add(t);
     }
   }
   return result;
 }