Netflix/RxJava — pull request #256 by michaeldejong (2013-05-03 23:19:49+00:00)
Title: Created the initial implementation of BehaviorSubject

I've been trying to implement the BehaviorSubject. Functionally it works as it should, but I'm not entirely happy with the static `createWithDefaultValue(T)` method. I can't create a static method `create(T)` because Subject extends Observable, which has a static `create(Object)` method. So to resolve that I had to give the static method in BehaviorSubject a different name.

Additionally I'm using an `AtomicReference` in this static method to keep track of the last published value. I tried coming up with different solutions to push the last published value to the Observer when it's subscribing, but this seems to be the most clean solution.

If there's any feedback on either issue, please let me know.