docker-java/docker-java — pull request #70 by albers (2014-10-07 15:29:59+00:00)
Title: Improve instantiation and serialization of Bind

This PR covers two topics:

* Introduces `Bind.toString()` so that serializing of `Bind` can be handled the same way as in `Volume`.
* As boolean arguments lead to non-intuitive and hard to memorize API (was this argument `isReadOnly` or `isReadWrite`?), a new enum `AccessMode` was introduced for use in the `Bind`'s constructor. This also improves parsing and serialization. The new API more closely resembles the Docker CLI syntax, which does not have a boolean notion of access mode.

The boolean constructor and `Bind.isReadOnly()` were kept for backwards compatibility.
*I would like to amend this PR to remove them, though.* What do you think of this?