protected void setAttributeAsBoolean (String name , Boolean value) { e.setAttribute(name, value.toString()); }
/** * <p>Sets the given attributes values to all the given network elements.</p> * * @param collection Network elements * @param attributeKey Attribute name * @param values Attribute values (must have the same size as {@code collection} */ public void setVectorAttributeValues(Collection<? extends NetworkElement> collection, String attributeKey, DoubleMatrix1D values) { if (values.size() != collection.size()) throw new Net2PlanException("The number of elements in the collection and the number of values to assign must be the same"); int counter = 0; for (NetworkElement e : collection) e.setAttribute(attributeKey, Double.toString(values.get(counter++))); }
if (!value.isEmpty()) ((NetworkElement)e).setAttribute(attributeKey, value); }, e->((NetworkElement)e).getAttribute(attributeKey, "") , AGTYPE.NOAGGREGATION , null));
if(key.isEmpty() || value.isEmpty()) return; for (NetworkElement ne : getSelectedNetworkElementsNorFr()) ne.setAttribute(key, value); }); }, (a,b)->b>0, null) , if(key.isEmpty() || value.isEmpty()) return; for (NetworkElement ne : getSelectedNetworkElementsNorFr()) ne.setAttribute(key, value); }); }, (a,b)->b==1 && !getSelectedNetworkElementsNorFr().first().getAttributes().isEmpty(), null) ,
String key = xmlStreamReader.getAttributeValue(xmlStreamReader.getAttributeIndex(null, "key")); String name = xmlStreamReader.getAttributeValue(xmlStreamReader.getAttributeIndex(null, "value")); if (updateElement != null) updateElement.setAttribute(key, name); break;
String key = xmlStreamReader.getAttributeValue(xmlStreamReader.getAttributeIndex(null, "key")); String name = xmlStreamReader.getAttributeValue(xmlStreamReader.getAttributeIndex(null, "value")); if (updateElement != null) updateElement.setAttribute(key, name); break;