@Test public void notBelongsToComponent() { assertFalse(defaultCommand.belongsToComponent("componentB")); }
@Override public Boolean belongsToComponent(String component) { return commandHandlers.stream().anyMatch(handler -> component.equals(handler.getComponentName())); }
DefaultCommand implements ComponentCommand { @Override public Boolean belongsToComponent(String component) { return commandHandlers.stream().anyMatch(handler -> component.equals(handler.getComponentName())); } }
DefaultCommand implements ComponentCommand { @Override public Boolean belongsToComponent(String component) { return commandHandlers.stream().anyMatch(handler -> component.equals(handler.getComponentName())); } DefaultCommand(CommandRegistrationCache.RegistrationEntry command, Set<CommandHandler> commandHandlers); }
DefaultCommand implements ComponentCommand { @Override public Boolean belongsToComponent(String component) { return commandHandlers.stream().anyMatch(handler -> component.equals(handler.getComponentName())); } DefaultCommand(CommandRegistrationCache.RegistrationEntry command, Set<CommandHandler> commandHandlers); @Override Boolean belongsToComponent(String component); @Override boolean belongsToContext(String context); @Override void printOn(Media media); }
DefaultCommand implements ComponentCommand { @Override public Boolean belongsToComponent(String component) { return commandHandlers.stream().anyMatch(handler -> component.equals(handler.getComponentName())); } DefaultCommand(CommandRegistrationCache.RegistrationEntry command, Set<CommandHandler> commandHandlers); @Override Boolean belongsToComponent(String component); @Override boolean belongsToContext(String context); @Override void printOn(Media media);  }