@Test public void getAvailableComponents() throws Exception { Assert.assertEquals(new HashSet<>(Arrays.asList("engine", "radio", "radar", "gps", "gun")), tactic.getAvailableComponents()); setField(tactic, "gun", null); Assert.assertEquals(new HashSet<>(Arrays.asList("engine", "radio", "radar", "gps")), tactic.getAvailableComponents()); }
public final Set<String> getAvailableComponents() { Set<String> componentlist = new HashSet<>(); if (radar != null) { componentlist.add("radar"); } if (gps != null) { componentlist.add("gps"); } if (engine != null) { componentlist.add("engine"); } if (radio != null) { componentlist.add("radio"); } if (gun != null) { componentlist.add("gun"); } return componentlist; }
Tactic extends ManagedThread implements Subscriber { public final Set<String> getAvailableComponents() { Set<String> componentlist = new HashSet<>(); if (radar != null) { componentlist.add("radar"); } if (gps != null) { componentlist.add("gps"); } if (engine != null) { componentlist.add("engine"); } if (radio != null) { componentlist.add("radio"); } if (gun != null) { componentlist.add("gun"); } return componentlist; } }
Tactic extends ManagedThread implements Subscriber { public final Set<String> getAvailableComponents() { Set<String> componentlist = new HashSet<>(); if (radar != null) { componentlist.add("radar"); } if (gps != null) { componentlist.add("gps"); } if (engine != null) { componentlist.add("engine"); } if (radio != null) { componentlist.add("radio"); } if (gun != null) { componentlist.add("gun"); } return componentlist; }  }
Tactic extends ManagedThread implements Subscriber { public final Set<String> getAvailableComponents() { Set<String> componentlist = new HashSet<>(); if (radar != null) { componentlist.add("radar"); } if (gps != null) { componentlist.add("gps"); } if (engine != null) { componentlist.add("engine"); } if (radio != null) { componentlist.add("radio"); } if (gun != null) { componentlist.add("gun"); } return componentlist; }  Radar getRadar(); GPS getGps(); Engine getEngine(); Gun getGun(); Radio getRadio(); final void startTactic(); final void stopTactic(); @Override @Deprecated final void destroy(); @Override void receive(Object msg, MultipartCallbacks multipartCallbacks); final String getIdentifier(); final Set<String> getAvailableComponents(); }
Tactic extends ManagedThread implements Subscriber { public final Set<String> getAvailableComponents() { Set<String> componentlist = new HashSet<>(); if (radar != null) { componentlist.add("radar"); } if (gps != null) { componentlist.add("gps"); } if (engine != null) { componentlist.add("engine"); } if (radio != null) { componentlist.add("radio"); } if (gun != null) { componentlist.add("gun"); } return componentlist; }  Radar getRadar(); GPS getGps(); Engine getEngine(); Gun getGun(); Radio getRadio(); final void startTactic(); final void stopTactic(); @Override @Deprecated final void destroy(); @Override void receive(Object msg, MultipartCallbacks multipartCallbacks); final String getIdentifier(); final Set<String> getAvailableComponents();  }