Created class Either<T,U> which hold either an instance of T or U. This
class is now the basis for the Observable/Publisher return method of
PostgresConnection.connections(). No longer successful and failed
connections are mixed here in a single class, both are now separated
class.
Code is now cleaner and type safer, while more readable. All in all,
good win IMHO.
Created class Either<T,U> which hold either an instance of T or U. This class is now the basis for the Observable/Publisher return method of PostgresConnection.connections(). No longer successful and failed connections are mixed here in a single class, both are now separated class.
Code is now cleaner and type safer, while more readable. All in all, good win IMHO.
This was based on ianp's suggestion: https://groups.google.com/d/msg/phoebe/xsxZ-B1ctq4/C-kpH7hjDQAJ