Class NumberOption
java.lang.Object
de.haumacher.msgbuf.data.AbstractDataObject
de.haumacher.msgbuf.generator.ast.Option
de.haumacher.msgbuf.generator.ast.NumberOption
- All Implemented Interfaces:
DataObject,ReflectiveDataObject,Observable
Option annotating an int value-
Nested Class Summary
Nested classes/interfaces inherited from class de.haumacher.msgbuf.generator.ast.Option
Option.TypeKind, Option.Visitor<R,A> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringIdentifier for theNumberOptiontype in JSON format.static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NumberOptioncreate()Creates aNumberOptioninstance.final doublegetValue()The number assigned to the option.protected final voidinternalSetValue(double value) Internal setter forgetValue()without chain call utility.jsonType()kind()The type code of this instance.protected voidreadField(JsonReader in, String field) static NumberOptionReads a new instance from the given reader.voidsetValue(double value) <R,A> R visit(Option.Visitor<R, A> v, A arg) Accepts the given visitor.protected voidwriteFields(JsonWriter out) Methods inherited from class de.haumacher.msgbuf.generator.ast.Option
internalRegisterListener, internalUnregisterListener, readOption, registerListener, unregisterListener, writeToMethods inherited from class de.haumacher.msgbuf.data.AbstractDataObject
readContent, readFields, toString, writeContent
-
Field Details
-
NUMBER_OPTION__TYPE
Identifier for theNumberOptiontype in JSON format.- See Also:
-
VALUE__PROP
- See Also:
-
-
Constructor Details
-
NumberOption
protected NumberOption()Creates aNumberOptioninstance.- See Also:
-
-
Method Details
-
create
Creates aNumberOptioninstance. -
kind
Description copied from class:OptionThe type code of this instance. -
getValue
public final double getValue()The number assigned to the option. -
setValue
- See Also:
-
internalSetValue
protected final void internalSetValue(double value) Internal setter forgetValue()without chain call utility. -
jsonType
-
properties
-
get
-
set
-
readNumberOption
Reads a new instance from the given reader.- Throws:
IOException
-
writeFields
- Overrides:
writeFieldsin classAbstractDataObject- Throws:
IOException
-
readField
- Overrides:
readFieldin classAbstractDataObject- Throws:
IOException
-
visit
Description copied from class:OptionAccepts the given visitor.
-