Class Flag

  • All Implemented Interfaces:
    de.haumacher.msgbuf.data.DataObject, de.haumacher.msgbuf.data.ReflectiveDataObject, de.haumacher.msgbuf.observer.Observable

    public class Flag
    extends Option
    Option annotating a boolean value
    • Constructor Detail

      • Flag

        protected Flag()
        Creates a Flag instance.
        See Also:
        create()
    • Method Detail

      • create

        public static Flag create()
        Creates a Flag instance.
      • isValue

        public final boolean isValue()
        The boolean value assigned to the option.
      • setValue

        public Flag setValue​(boolean value)
        See Also:
        isValue()
      • internalSetValue

        protected final void internalSetValue​(boolean value)
        Internal setter for isValue() without chain call utility.
      • jsonType

        public String jsonType()
      • readFlag

        public static Flag readFlag​(de.haumacher.msgbuf.json.JsonReader in)
                             throws IOException
        Reads a new instance from the given reader.
        Throws:
        IOException
      • writeFields

        protected void writeFields​(de.haumacher.msgbuf.json.JsonWriter out)
                            throws IOException
        Overrides:
        writeFields in class de.haumacher.msgbuf.data.AbstractDataObject
        Throws:
        IOException
      • readField

        protected void readField​(de.haumacher.msgbuf.json.JsonReader in,
                                 String field)
                          throws IOException
        Overrides:
        readField in class de.haumacher.msgbuf.data.AbstractDataObject
        Throws:
        IOException
      • visit

        public <R,​A> R visit​(Option.Visitor<R,​A> v,
                                   A arg)
        Description copied from class: Option
        Accepts the given visitor.
        Specified by:
        visit in class Option