Improve efficiency of isEmpty() methods

This commit is contained in:
James Agnew 2019-10-13 19:39:19 -04:00
parent d3ab74a8e3
commit 0cf2cafb62
3 changed files with 20 additions and 0 deletions

View File

@ -147,4 +147,11 @@ public class Base64BinaryType extends PrimitiveType<byte[]> implements IPrimitiv
return myValue != null && myValue.length > 0;
}
@Override
public boolean isEmpty() {
// Custom isEmpty() in order to avoid generating the text representation unneccessarily
return ca.uhn.fhir.util.ElementUtil.isEmpty(id, extension) && !hasValue();
}
}

View File

@ -148,4 +148,10 @@ public class Base64BinaryType extends PrimitiveType<byte[]> implements IPrimitiv
return myValue != null && myValue.length > 0;
}
@Override
public boolean isEmpty() {
// Custom isEmpty() in order to avoid generating the text representation unneccessarily
return ca.uhn.fhir.util.ElementUtil.isEmpty(id, extension) && !hasValue();
}
}

View File

@ -148,4 +148,11 @@ public class Base64BinaryType extends PrimitiveType<byte[]> implements IPrimitiv
return myValue != null && myValue.length > 0;
}
@Override
public boolean isEmpty() {
// Custom isEmpty() in order to avoid generating the text representation unneccessarily
return ca.uhn.fhir.util.ElementUtil.isEmpty(id, extension) && !hasValue();
}
}