Make KEY_ABSENT and KEY_PRESENT constants

They were just missing the final keyword.

Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
Change packaging to bundle

This emits proper OSGi manifest, so the resulting jar can be used as a
bundle.

Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
Merge pull request #10 from rovarga/fix-instantiation-overhead

Fix instantiation overhead
Merge pull request #12 from rovarga/packaging-bundle

Change packaging to bundle
Merge pull request #11 from rovarga/make-key-objects-constant

Make KEY_ABSENT and KEY_PRESENT constants
Merge pull request #9 from rovarga/fix-broken-serialization

Fix constructor not passing down proper values
Improve serialization performance

Couple of improvements to the serialization strategy:
- emit the fact that the map is read-only, so we preserve that trait
- write out the size and entries ourselves, not via an intermediate
  HashMap()

The read path now takes these changes into account and resets the
rootupdater after deserialization is done back to null.

Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
Make hash/equality function final

Removes duplicate fields and makes the equivalent methods final. Also
marks things that we take care of as transient, thus allowing us to
reuse the JVM magic in serialization.

Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
Rework the read-only handling

Instead of using the updater reference as the indicator of read-only
views, add an explicit boolean. Thus all instances reuse a single
updater reference, but still guard access to it via an explicit check.

This changes the behavior a bit: instead of throwing NPE on read-only
views, we throw IllegalStateException. The reason for that is that we
should have caught the attempt in the MAP API functions.

Signed-off-by: Robert Varga <robert.varga@pantheon.sk>