Skip to content

Support annotations & generic base type

Compare
Choose a tag to compare
@trevjonez trevjonez released this 14 Jul 17:10
· 59 commits to master since this release

This adds a generic type key for the ObjectCondition so that a check like this:

require(typeToAdd).isNotNull().passes(subject -> !((Class) subject).isInterface());

can be cleaned up to look like this:

require(typeToAdd).isNotNull().passes(subject -> !subject.isInterface());

It also adds the @CheckResult annotation so that a line like this:

check(someVar).message("This should not be null");

will be labeled as an error by android studio so that you know to update it to this:

check(someVar).message("This should not be null").isNotNull();