What's your definition of abstract in this context given that enum's can't
be abstract?

Do you just mean giving the enum a constructor with a boolean indicating
whether it represents a boolean state? And have an isConnected() and an
isDisconnected() method on the enum returning the state of this boolean
(and it's inverse)?
cheers


On Wed, Jun 4, 2014 at 9:16 AM, Jordan Zimmerman <notifications@github.com>
wrote:

> In
> curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionState.java:
>
> > @@ -57,5 +57,15 @@
> >       * <a href="http://wiki.apache.org/hadoop/ZooKeeper/GSoCReadOnlyMode">http://wiki.apache.org/hadoop/ZooKeeper/GSoCReadOnlyMode</a>.
> >       * The connection will remain in read only mode until another state change is sent.
> >       */
> > -    READ_ONLY
> > +    READ_ONLY;
> > +
> > +    /**
> > +     * Check if this state indicates that Curator has a connection to ZooKeeper
> > +     *
> > +     * @return True if connected, false otherwise
> > +     */
> > +    public boolean isConnected()
> > +    {
> > +        return this == CONNECTED || this == RECONNECTED || this == READ_ONLY;
>
> I'd prefer to see this as an abstract method and have each enum return the
> correct value
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/apache/curator/pull/9/files#r13364526>.
>