Improve efficiency of isEmpty() methods
This commit is contained in:
parent
d3ab74a8e3
commit
0cf2cafb62
|
@ -147,4 +147,11 @@ public class Base64BinaryType extends PrimitiveType<byte[]> implements IPrimitiv
|
||||||
return myValue != null && myValue.length > 0;
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,4 +148,10 @@ public class Base64BinaryType extends PrimitiveType<byte[]> implements IPrimitiv
|
||||||
return myValue != null && myValue.length > 0;
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,4 +148,11 @@ public class Base64BinaryType extends PrimitiveType<byte[]> implements IPrimitiv
|
||||||
return myValue != null && myValue.length > 0;
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue