+ /**
+ * Get the recursive state of the current object, i.e., its children. It
+ * represents the full state information about this object's children.
+ *
+ * @return a {@link String} representing the current content state of this
+ * object, i.e., its children included
+ */
+ public String getContentState() {
+ StringBuilder builder = new StringBuilder();
+ buildContentStateRaw(builder);
+ return StringUtils.getHash(builder.toString());
+ }
+
+ /**
+ * Return the (first) child element with the given ID or NULL if not found.
+ *
+ * @param id
+ * the id to look for
+ *
+ * @return the child element or NULL
+ */
+ public E getById(String id) {
+ for (E child : this) {
+ if (id == null) {
+ if (child.getId() == null)
+ return child;
+ } else {
+ if (id.equals(child.getId()))
+ return child;
+ }
+ }
+
+ return null;
+ }
+