/** * If not already created, a new <code>constraint</code> element will be created and returned. * Otherwise, the first existing <code>constraint</code> element will be returned. * @return the instance defined for the element <code>constraint</code> */ public ConstraintType<GetterType<T>> getOrCreateConstraint() { List<Node> nodeList = childNode.get("constraint"); if (nodeList != null && nodeList.size() > 0) { return new ConstraintTypeImpl<GetterType<T>>(this, "constraint", childNode, nodeList.get(0)); } return createConstraint(); }
/** * If not already created, a new <code>constraint</code> element will be created and returned. * Otherwise, the first existing <code>constraint</code> element will be returned. * @return the instance defined for the element <code>constraint</code> */ public ConstraintType<GetterType<T>> getOrCreateConstraint() { List<Node> nodeList = childNode.get("constraint"); if (nodeList != null && nodeList.size() > 0) { return new ConstraintTypeImpl<GetterType<T>>(this, "constraint", childNode, nodeList.get(0)); } return createConstraint(); }