iZettle/izettle-toolbox — pull request #31 by adamvoncorswant (2013-12-17 23:08:23+00:00)
Title: [For discussion] ValueChecks: Alternative used syntax in ValueChecks

The main reason for starting this out was with the original intention of
migrating some util classes from the proprietary repo to this one, but
with the realization that there are quite some syntactic differences.

This commit is mostly for discussion, but also with a hope of aligning
the lingo in the two different util libraries so that a migration to
this one can be performed.

1. Removes the terms `defined` and `undefined`. This lingo feels awkward
to me. There is a term `null` in the language already: why complicate
things? Also `isNull` is shorter and clearer in my opinion.

2. Removes inverse methods, as I think the class gets bloated with those.

3. Prefixes methods with a `is` to make it clearer that it's a question,
and that it doesn't perform any modification on the arguments. Also, for
example, `isEmpty` is standard in the java language.

4. Adds `ifNull` and `ifEmpty` methods to make future code migration easier, as
those are present in the proprietary repo.

ping @oskarwiksten and @mikaellothman : What do you think? Do you really like the existing lingo?
ping @staffanjonsson : I might need some moral support here :)