Class NumberOption

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

    public class NumberOption
    extends Option
    Option annotating an int value
    • Constructor Detail

    • Method Detail

      • getValue

        public final double getValue()
        The number assigned to the option.
      • internalSetValue

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

        public String jsonType()
      • readNumberOption

        public static NumberOption readNumberOption​(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