All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.somda.sdc.biceps.model.message.SetValue Maven / Gradle / Ivy

Go to download

SDCri is a set of Java libraries that implements a network communication framework conforming with the IEEE 11073 SDC specifications. This project implements the model for IEEE 11073-10207.

The newest version!

package org.somda.sdc.biceps.model.message;

import java.math.BigDecimal;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlType;
import org.jvnet.jaxb.lang.CopyStrategy;
import org.jvnet.jaxb.lang.CopyTo;
import org.jvnet.jaxb.lang.JAXBCopyStrategy;
import org.jvnet.jaxb.lang.JAXBToStringStrategy;
import org.jvnet.jaxb.lang.ToString;
import org.jvnet.jaxb.lang.ToStringStrategy;
import org.jvnet.jaxb.locator.ObjectLocator;
import org.jvnet.jaxb.locator.util.LocatorUtils;


/**
 * 

Java class for anonymous complex type

. * *

The following schema fragment specifies the expected content contained within this class.

* *
{@code
 * 
 *   
 *     
 *       
 *         
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "requestedNumericValue" }) @XmlRootElement(name = "SetValue", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message") public class SetValue extends AbstractSet implements Cloneable, CopyTo, ToString { /** * Value of pm:NumericMetricState/pm:ObservedValue/@Value to set. * */ @XmlElement(name = "RequestedNumericValue", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message", required = true) protected BigDecimal requestedNumericValue; /** * Value of pm:NumericMetricState/pm:ObservedValue/@Value to set. * * @return * possible object is * {@link BigDecimal } * */ public BigDecimal getRequestedNumericValue() { return requestedNumericValue; } /** * Sets the value of the requestedNumericValue property. * * @param value * allowed object is * {@link BigDecimal } * * @see #getRequestedNumericValue() */ public void setRequestedNumericValue(BigDecimal value) { this.requestedNumericValue = value; } @Override public boolean equals(Object object) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } if (!super.equals(object)) { return false; } final SetValue that = ((SetValue) object); { BigDecimal leftRequestedNumericValue; leftRequestedNumericValue = this.getRequestedNumericValue(); BigDecimal rightRequestedNumericValue; rightRequestedNumericValue = that.getRequestedNumericValue(); if (this.requestedNumericValue!= null) { if (that.requestedNumericValue!= null) { if (!leftRequestedNumericValue.equals(rightRequestedNumericValue)) { return false; } } else { return false; } } else { if (that.requestedNumericValue!= null) { return false; } } } return true; } @Override public int hashCode() { int currentHashCode = 1; currentHashCode = ((currentHashCode* 31)+ super.hashCode()); { currentHashCode = (currentHashCode* 31); BigDecimal theRequestedNumericValue; theRequestedNumericValue = this.getRequestedNumericValue(); if (this.requestedNumericValue!= null) { currentHashCode += theRequestedNumericValue.hashCode(); } } return currentHashCode; } @Override public String toString() { final ToStringStrategy strategy = JAXBToStringStrategy.getInstance(); final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } @Override public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; } @Override public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { super.appendFields(locator, buffer, strategy); { BigDecimal theRequestedNumericValue; theRequestedNumericValue = this.getRequestedNumericValue(); strategy.appendField(locator, this, "requestedNumericValue", buffer, theRequestedNumericValue, (this.requestedNumericValue!= null)); } return buffer; } @Override public Object clone() { return copyTo(createNewInstance()); } @Override public Object copyTo(Object target) { final CopyStrategy strategy = JAXBCopyStrategy.getInstance(); return copyTo(null, target, strategy); } @Override public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); super.copyTo(locator, draftCopy, strategy); if (draftCopy instanceof SetValue) { final SetValue copy = ((SetValue) draftCopy); { Boolean requestedNumericValueShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.requestedNumericValue!= null)); if (requestedNumericValueShouldBeCopiedAndSet == Boolean.TRUE) { BigDecimal sourceRequestedNumericValue; sourceRequestedNumericValue = this.getRequestedNumericValue(); BigDecimal copyRequestedNumericValue = ((BigDecimal) strategy.copy(LocatorUtils.property(locator, "requestedNumericValue", sourceRequestedNumericValue), sourceRequestedNumericValue, (this.requestedNumericValue!= null))); copy.setRequestedNumericValue(copyRequestedNumericValue); } else { if (requestedNumericValueShouldBeCopiedAndSet == Boolean.FALSE) { copy.requestedNumericValue = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new SetValue(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy