/** {@inheritDoc} */ @Override public EcoTouchTags[] getActiveItems() { ArrayList<EcoTouchTags> items = new ArrayList<EcoTouchTags>(); for (Entry<String, BindingConfig> entry : bindingConfigs.entrySet()) { EcoTouchBindingConfig heatpumpConfig = (EcoTouchBindingConfig) entry.getValue(); items.add(heatpumpConfig.getType()); } return items.toArray(new EcoTouchTags[items.size()]); }
/** {@inheritDoc} */ @Override public String[] getActiveTags() { Set<String> tagNames = new HashSet<String>(); for (Entry<String, BindingConfig> entry : bindingConfigs.entrySet()) { EcoTouchBindingConfig heatpumpConfig = (EcoTouchBindingConfig) entry.getValue(); tagNames.add(heatpumpConfig.getType().getTagName()); } return tagNames.toArray(new String[tagNames.size()]); }
/** {@inheritDoc} */ @Override public String[] getItemNamesForType(EcoTouchTags eventType) { Set<String> itemNames = new HashSet<String>(); for (Entry<String, BindingConfig> entry : bindingConfigs.entrySet()) { EcoTouchBindingConfig heatpumpConfig = (EcoTouchBindingConfig) entry.getValue(); if (heatpumpConfig.getType().equals(eventType)) { itemNames.add(entry.getKey()); } } return itemNames.toArray(new String[itemNames.size()]); }
/** {@inheritDoc} */ @Override public EcoTouchTags getTypeForItemName(String itemName) { EcoTouchBindingConfig heatpumpConfig = (EcoTouchBindingConfig) bindingConfigs.get(itemName); return heatpumpConfig.getType(); }