Class Field.FieldBuilder
-
- All Implemented Interfaces:
public class Field.FieldBuilder
-
-
Constructor Summary
Constructors Constructor Description Field.FieldBuilder()
-
Method Summary
Modifier and Type Method Description final Field.FieldBuilderblock(Block block)The block to which this block must be linked final Field.FieldBuilderid(String id)The technical id of this field. final Field.FieldBuilderdescription(String description)A human-readable description of this field. final Field.FieldBuildershortDescription(String shortDescription)A shorter variant of the Human-readable description of the field. final Field.FieldBuilderimmutable(Boolean immutable)If a field NEVER changes then this can be se to true. final Field.FieldBuildersystem(Boolean system)Some fields are system fields which means they should not be used by the application. final Field.FieldBuilderexpression(String expression)The expression that defines how this Field gets its value. final Field.FieldBuilderunit(String unit)Human-readable unit of the field (like 'V' for Volt or '%' for percentage). final Field.FieldBuilderfetchGroup(String fetchGroup)An identifier to that can be used to ensure all needed registers are retrieved together. final Fieldbuild()Build the Field, throws IllegalArgumentException if something is wrong -
-
Method Detail
-
block
final Field.FieldBuilder block(Block block)
The block to which this block must be linked
-
id
final Field.FieldBuilder id(String id)
The technical id of this field. Must be usable as an identifier in 'all' common programming languages. So "CamelCase" (without spaces) is a good choice.
-
description
final Field.FieldBuilder description(String description)
A human-readable description of this field.
-
shortDescription
final Field.FieldBuilder shortDescription(String shortDescription)
A shorter variant of the Human-readable description of the field. If no shorter version is available then it will be the same as the 'long' description.
-
immutable
final Field.FieldBuilder immutable(Boolean immutable)
If a field NEVER changes then this can be se to true. This allows a library to only read this value the first time and on subsequent updates skip reading this value.
-
system
final Field.FieldBuilder system(Boolean system)
Some fields are system fields which means they should not be used by the application.
-
expression
final Field.FieldBuilder expression(String expression)
The expression that defines how this Field gets its value.
-
unit
final Field.FieldBuilder unit(String unit)
Human-readable unit of the field (like 'V' for Volt or '%' for percentage).
-
fetchGroup
final Field.FieldBuilder fetchGroup(String fetchGroup)
An identifier to that can be used to ensure all needed registers are retrieved together. By default, filled with a random unique value or what was dictated by the block
-
-
-
-