There are a number of issues with the API. Nothing terribly serious, but should we should simply clean it up before a 2.0.0 release.
Constructors aren't consistent with the ordering. For instance ParentNodes are (parent, children), while all others are (something..., parent).
They are riddled with null safety issues. Basically, these objects allow null objects which can cause all kinds of issues when used later. For instance the Criteria classes which use a comparator will bomb out when the comparison is done, which may be way after the query is actually generated.
Forcing nodes to be of similar types even though it doesn't make sense. For instance, HasLeaf is consisdered a KeyValueNode, yet the Class object which is used, is not actually the value object (that is actually null). Also see #198.
We use 'key', which doesn't really mean much in the sense of criteria. It should be a more criteria centric thing such as 'term' or 'field'.
Some of the Criteria objects don't work like the others. For example GreaterThanCriteria ignores the key component when evaluating the criteria, while EqualsCriteria does not. I don't know if this was intended behavior or a bug.
There are a number of issues with the API. Nothing terribly serious, but should we should simply clean it up before a 2.0.0 release.