org.somda.sdc.biceps.model.message.VersionFrame Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of biceps-model Show documentation
Show all versions of biceps-model Show documentation
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.BigInteger;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
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;
/**
* VersionFrame constitutes a version frame by defining ./@Start and ./@End, whereby ./@Start is REQUIRED to be lesser than or equal to ./@End.
*
* Java class for VersionFrame complex type
.
*
* The following schema fragment specifies the expected content contained within this class.
*
* {@code
*
*
*
*
*
*
*
*
* }
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "VersionFrame", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message")
public class VersionFrame implements Cloneable, CopyTo, ToString
{
/**
* The start version of the version frame.
*
*/
@XmlAttribute(name = "Start")
protected BigInteger start;
/**
* The end version of the version frame.
*
*/
@XmlAttribute(name = "End")
protected BigInteger end;
/**
* The start version of the version frame.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getStart() {
return start;
}
/**
* Sets the value of the start property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
* @see #getStart()
*/
public void setStart(BigInteger value) {
this.start = value;
}
/**
* The end version of the version frame.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getEnd() {
return end;
}
/**
* Sets the value of the end property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
* @see #getEnd()
*/
public void setEnd(BigInteger value) {
this.end = value;
}
@Override
public boolean equals(Object object) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final VersionFrame that = ((VersionFrame) object);
{
BigInteger leftStart;
leftStart = this.getStart();
BigInteger rightStart;
rightStart = that.getStart();
if (this.start!= null) {
if (that.start!= null) {
if (!leftStart.equals(rightStart)) {
return false;
}
} else {
return false;
}
} else {
if (that.start!= null) {
return false;
}
}
}
{
BigInteger leftEnd;
leftEnd = this.getEnd();
BigInteger rightEnd;
rightEnd = that.getEnd();
if (this.end!= null) {
if (that.end!= null) {
if (!leftEnd.equals(rightEnd)) {
return false;
}
} else {
return false;
}
} else {
if (that.end!= null) {
return false;
}
}
}
return true;
}
@Override
public int hashCode() {
int currentHashCode = 1;
{
currentHashCode = (currentHashCode* 31);
BigInteger theStart;
theStart = this.getStart();
if (this.start!= null) {
currentHashCode += theStart.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
BigInteger theEnd;
theEnd = this.getEnd();
if (this.end!= null) {
currentHashCode += theEnd.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) {
{
BigInteger theStart;
theStart = this.getStart();
strategy.appendField(locator, this, "start", buffer, theStart, (this.start!= null));
}
{
BigInteger theEnd;
theEnd = this.getEnd();
strategy.appendField(locator, this, "end", buffer, theEnd, (this.end!= 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);
if (draftCopy instanceof VersionFrame) {
final VersionFrame copy = ((VersionFrame) draftCopy);
{
Boolean startShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.start!= null));
if (startShouldBeCopiedAndSet == Boolean.TRUE) {
BigInteger sourceStart;
sourceStart = this.getStart();
BigInteger copyStart = ((BigInteger) strategy.copy(LocatorUtils.property(locator, "start", sourceStart), sourceStart, (this.start!= null)));
copy.setStart(copyStart);
} else {
if (startShouldBeCopiedAndSet == Boolean.FALSE) {
copy.start = null;
}
}
}
{
Boolean endShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.end!= null));
if (endShouldBeCopiedAndSet == Boolean.TRUE) {
BigInteger sourceEnd;
sourceEnd = this.getEnd();
BigInteger copyEnd = ((BigInteger) strategy.copy(LocatorUtils.property(locator, "end", sourceEnd), sourceEnd, (this.end!= null)));
copy.setEnd(copyEnd);
} else {
if (endShouldBeCopiedAndSet == Boolean.FALSE) {
copy.end = null;
}
}
}
}
return draftCopy;
}
@Override
public Object createNewInstance() {
return new VersionFrame();
}
}