public boolean containsTimeValues() { if (values.isEmpty()) { return false; } for (Attributes p : values) { if (p.isSet("time")) { return true; } } return false; } }
private void enforceChildLayout(@Nonnull final Attributes attributes, final int childCount) { if (!attributes.isSet("childLayout") && childCount > 0) { throw new RuntimeException("missing childLayout attribute for an element with [" + childCount + "] child " + "elements. Attributes of error element [" + attributes.toString() + "]"); } }
@SuppressWarnings("ConstantConditions") public void resolveParameters(@Nonnull final Attributes attributes) { List<Parameter> entrySet = getParameterSet(); for (Parameter entry : entrySet) { String key = entry.getKey(); String value = entry.getValue(); // first check the given attributes and then check our own if (attributes.isSet(key)) { set(value, controlParameter.applyParameter(entry.getOriginalValue(), entry.getKey(), attributes.get(key))); } else if (isSet(key) && !isParameterDefinition(get(key))) { set(value, get(key)); } else { remove(value); } } }
String paddingTop = Convert.DEFAULT_PADDING; String paddingBottom = Convert.DEFAULT_PADDING; if (attributes.isSet("padding")) { try { String padding = attributes.get("padding"); String marginTop = Convert.DEFAULT_MARGIN; String marginBottom = Convert.DEFAULT_MARGIN; if (attributes.isSet("margin")) { try { String margin = attributes.get("margin");