Add hasValue() method to XhtmlNode

This commit is contained in:
James Agnew 2019-07-17 18:50:22 -04:00
parent b3093029ee
commit c470bb21ce
1 changed files with 6 additions and 0 deletions

View File

@ -60,6 +60,8 @@ import org.hl7.fhir.utilities.Utilities;
import ca.uhn.fhir.model.primitive.XhtmlDt;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
@ca.uhn.fhir.model.api.annotation.DatatypeDef(name="xhtml")
public class XhtmlNode implements IBaseXhtml {
private static final long serialVersionUID = -4362547161441436492L;
@ -423,6 +425,10 @@ public class XhtmlNode implements IBaseXhtml {
return getValueAsString();
}
public boolean hasValue() {
return isNotBlank(getValueAsString());
}
@Override
public XhtmlNode setValue(String theValue) throws IllegalArgumentException {
setValueAsString(theValue);