(note: part of https://github.com/FasterXML/jackson-future-ideas/wiki/JSTEP-3)
Currently there is just one shared removal method for ArrayNode, ObjectNode, declared in ContainerNode:
public abstract T removeAll();
So let's add some more:
T removeIf(Predicate<? super JsonNode>)
T removeNulls(): (short-cut for removeIf(JsonNode::isNull))
We could also consider clear() (similar to Collection), however, given there is already removeAll() let's not add that.
Also considered but not yet added:
T removeEmpty(): (short-cut for removeIf(JsonNode::isEmpty))