BaseXdb/basex — comment on commit f5663e4990fe1b375558c922208b5330f2af9ed3
File: src/main/java/org/basex/core/Context.java line 97
By LeoWoerteler:

For collections in general, `!isEmpty()` ist more safe. Assume a singly-linked list with nodes defined as

```java
public class LinkedList {
private Node head;
[...]
}

class Node {
V value;
Node next;
}
```
`isEmpty()` is trivial and *O(1)*:

```java
public boolean isEmpty() {
return head == null;
}
```

But `size()` is actually *O(n)*:

```java
public int size() {
int size = 0;
for(Node nd = head; nd != null; nd = nd.next) {
size++;
}
return size;
}
```