Class TemperatureBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.http.openconfig.net.yang.platform.rev210118.platform.component.temp.state.TemperatureBuilder
-
@Generated("mdsal-binding-generator") public class TemperatureBuilder extends Object
Class that buildsTemperatureinstances. Overall design of the class is that of a fluent interface, where method chaining is used.In general, this class is supposed to be used like this template:
Temperature createTemperature(int fooXyzzy, int barBaz) { return new TemperatureBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }This pattern is supported by the immutable nature of Temperature, as instances can be freely passed around without worrying about synchronization issues.
As a side note: method chaining results in:
- very efficient Java bytecode, as the method invocation result, in this case the Builder reference, is
on the stack, so further method invocations just need to fill method arguments for the next method
invocation, which is terminated by
build(), which is then returned from the method - better understanding by humans, as the scope of mutable state (the builder) is kept to a minimum and is very localized
- better optimization opportunities, as the object scope is minimized in terms of invocation (rather than method) stack, making escape analysis a lot easier. Given enough compiler (JIT/AOT) prowess, the cost of th builder object can be completely eliminated
- See Also:
Temperature
- very efficient Java bytecode, as the method invocation result, in this case the Builder reference, is
on the stack, so further method invocations just need to fill method arguments for the next method
invocation, which is terminated by
-
-
Constructor Summary
Constructors Constructor Description TemperatureBuilder()TemperatureBuilder(MinMaxTime arg)TemperatureBuilder(StatIntervalState arg)TemperatureBuilder(Temperature base)TemperatureBuilder(PlatformComponentTempAlarmState arg)TemperatureBuilder(AvgMinMaxInstantStatsPrecision1Celsius arg)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TemperatureBuilderaddAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<Temperature> augmentation)Add an augmentation to this builder's product.<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Temperature>>
E$$augmentation(Class<E$$> augmentationType)Temperaturebuild()A newTemperatureinstance.voidfieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)Set fields from given grouping argument.Class<? extends OPENCONFIGALARMSEVERITY>getAlarmSeverity()BooleangetAlarmStatus()org.opendaylight.yangtools.yang.common.Uint32getAlarmThreshold()org.opendaylight.yangtools.yang.common.Decimal64getAvg()org.opendaylight.yangtools.yang.common.Decimal64getInstant()StatIntervalgetInterval()org.opendaylight.yangtools.yang.common.Decimal64getMax()Timeticks64getMaxTime()org.opendaylight.yangtools.yang.common.Decimal64getMin()Timeticks64getMinTime()TemperatureBuilderremoveAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Temperature>> augmentationType)Remove an augmentation from this builder's product.TemperatureBuildersetAlarmSeverity(Class<? extends OPENCONFIGALARMSEVERITY> value)TemperatureBuildersetAlarmStatus(Boolean value)TemperatureBuildersetAlarmThreshold(org.opendaylight.yangtools.yang.common.Uint32 value)TemperatureBuildersetAvg(org.opendaylight.yangtools.yang.common.Decimal64 value)TemperatureBuildersetInstant(org.opendaylight.yangtools.yang.common.Decimal64 value)TemperatureBuildersetInterval(StatInterval value)TemperatureBuildersetMax(org.opendaylight.yangtools.yang.common.Decimal64 value)TemperatureBuildersetMaxTime(Timeticks64 value)TemperatureBuildersetMin(org.opendaylight.yangtools.yang.common.Decimal64 value)TemperatureBuildersetMinTime(Timeticks64 value)
-
-
-
Constructor Detail
-
TemperatureBuilder
public TemperatureBuilder()
-
TemperatureBuilder
public TemperatureBuilder(AvgMinMaxInstantStatsPrecision1Celsius arg)
-
TemperatureBuilder
public TemperatureBuilder(StatIntervalState arg)
-
TemperatureBuilder
public TemperatureBuilder(MinMaxTime arg)
-
TemperatureBuilder
public TemperatureBuilder(PlatformComponentTempAlarmState arg)
-
TemperatureBuilder
public TemperatureBuilder(Temperature base)
-
-
Method Detail
-
fieldsFrom
public void fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument. Valid argument is instance of one of following types:- PlatformComponentTempAlarmState
- AvgMinMaxInstantStatsPrecision1Celsius
- StatIntervalState
- MinMaxTime
- Parameters:
arg- grouping object- Throws:
IllegalArgumentException- if given argument is none of valid types or has property with incompatible value
-
getAlarmSeverity
public Class<? extends OPENCONFIGALARMSEVERITY> getAlarmSeverity()
-
getAlarmStatus
public Boolean getAlarmStatus()
-
getAlarmThreshold
public org.opendaylight.yangtools.yang.common.Uint32 getAlarmThreshold()
-
getAvg
public org.opendaylight.yangtools.yang.common.Decimal64 getAvg()
-
getInstant
public org.opendaylight.yangtools.yang.common.Decimal64 getInstant()
-
getInterval
public StatInterval getInterval()
-
getMax
public org.opendaylight.yangtools.yang.common.Decimal64 getMax()
-
getMaxTime
public Timeticks64 getMaxTime()
-
getMin
public org.opendaylight.yangtools.yang.common.Decimal64 getMin()
-
getMinTime
public Timeticks64 getMinTime()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Temperature>> E$$ augmentation(Class<E$$> augmentationType)
-
setAlarmSeverity
public TemperatureBuilder setAlarmSeverity(Class<? extends OPENCONFIGALARMSEVERITY> value)
-
setAlarmStatus
public TemperatureBuilder setAlarmStatus(Boolean value)
-
setAlarmThreshold
public TemperatureBuilder setAlarmThreshold(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setAvg
public TemperatureBuilder setAvg(org.opendaylight.yangtools.yang.common.Decimal64 value)
-
setInstant
public TemperatureBuilder setInstant(org.opendaylight.yangtools.yang.common.Decimal64 value)
-
setInterval
public TemperatureBuilder setInterval(StatInterval value)
-
setMax
public TemperatureBuilder setMax(org.opendaylight.yangtools.yang.common.Decimal64 value)
-
setMaxTime
public TemperatureBuilder setMaxTime(Timeticks64 value)
-
setMin
public TemperatureBuilder setMin(org.opendaylight.yangtools.yang.common.Decimal64 value)
-
setMinTime
public TemperatureBuilder setMinTime(Timeticks64 value)
-
addAugmentation
public TemperatureBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<Temperature> augmentation)
Add an augmentation to this builder's product.- Parameters:
augmentation- augmentation to be added- Returns:
- this builder
- Throws:
NullPointerException- ifaugmentationis null
-
removeAugmentation
public TemperatureBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Temperature>> augmentationType)
Remove an augmentation from this builder's product. If this builder does not track such an augmentation type, this method does nothing.- Parameters:
augmentationType- augmentation type to be removed- Returns:
- this builder
-
build
public Temperature build()
A newTemperatureinstance.- Returns:
- A new
Temperatureinstance.
-
-