Class TemperatureBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.http.openconfig.net.yang.platform.rev210118.platform.component.temp.state.TemperatureBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<Temperature>,org.opendaylight.yangtools.concepts.CheckedBuilder<Temperature,IllegalArgumentException>,org.opendaylight.yangtools.concepts.Mutable,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
@Generated("mdsal-binding-generator") public class TemperatureBuilder extends Object implements org.opendaylight.yangtools.concepts.Builder<Temperature>
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,Builder
-
-
Constructor Summary
Constructors Constructor Description TemperatureBuilder()TemperatureBuilder(MinMaxTime arg)TemperatureBuilder(StatIntervalState arg)TemperatureBuilder(Temperature base)TemperatureBuilder(PlatformComponentTempAlarmState arg)TemperatureBuilder(AvgMinMaxInstantStatsPrecision1Celsius arg)
-
Method Summary
-
-
-
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 BigDecimal getAvg()
-
getInstant
public BigDecimal getInstant()
-
getInterval
public StatInterval getInterval()
-
getMax
public BigDecimal getMax()
-
getMaxTime
public Timeticks64 getMaxTime()
-
getMin
public BigDecimal 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(BigDecimal value)
-
setInstant
public TemperatureBuilder setInstant(BigDecimal value)
-
setInterval
public TemperatureBuilder setInterval(StatInterval value)
-
setMax
public TemperatureBuilder setMax(BigDecimal value)
-
setMaxTime
public TemperatureBuilder setMaxTime(Timeticks64 value)
-
setMin
public TemperatureBuilder setMin(BigDecimal 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()
- Specified by:
buildin interfaceorg.opendaylight.yangtools.concepts.Builder<Temperature>- Specified by:
buildin interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<Temperature,IllegalArgumentException>
-
-