![JAR search and dependency download from the Maven repository](/logo.png)
org.somda.sdc.biceps.model.message.SetMetricState Maven / Gradle / Ivy
package org.somda.sdc.biceps.model.message;
import java.util.ArrayList;
import java.util.List;
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;
import org.somda.sdc.biceps.model.participant.AbstractMetricState;
/**
* 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 = {
"proposedMetricState"
})
@XmlRootElement(name = "SetMetricState", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message")
public class SetMetricState
extends AbstractSet
implements Cloneable, CopyTo, ToString
{
/**
* ProposedMetricState comprises the METRIC states that have to be updated.
*
*/
@XmlElement(name = "ProposedMetricState", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message", required = true)
protected List proposedMetricState;
/**
* ProposedMetricState comprises the METRIC states that have to be updated.
*
* Gets the value of the proposedMetricState property.
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a set
method for the proposedMetricState property.
*
*
* For example, to add a new item, do as follows:
*
*
* getProposedMetricState().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link AbstractMetricState }
*
*
*
* @return
* The value of the proposedMetricState property.
*/
public List getProposedMetricState() {
if (proposedMetricState == null) {
proposedMetricState = new ArrayList<>();
}
return this.proposedMetricState;
}
public void setProposedMetricState(List value) {
this.proposedMetricState = null;
if (value!= null) {
List draftl = this.getProposedMetricState();
draftl.addAll(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 SetMetricState that = ((SetMetricState) object);
{
List leftProposedMetricState;
leftProposedMetricState = (((this.proposedMetricState!= null)&&(!this.proposedMetricState.isEmpty()))?this.getProposedMetricState():null);
List rightProposedMetricState;
rightProposedMetricState = (((that.proposedMetricState!= null)&&(!that.proposedMetricState.isEmpty()))?that.getProposedMetricState():null);
if ((this.proposedMetricState!= null)&&(!this.proposedMetricState.isEmpty())) {
if ((that.proposedMetricState!= null)&&(!that.proposedMetricState.isEmpty())) {
if (!leftProposedMetricState.equals(rightProposedMetricState)) {
return false;
}
} else {
return false;
}
} else {
if ((that.proposedMetricState!= null)&&(!that.proposedMetricState.isEmpty())) {
return false;
}
}
}
return true;
}
@Override
public int hashCode() {
int currentHashCode = 1;
currentHashCode = ((currentHashCode* 31)+ super.hashCode());
{
currentHashCode = (currentHashCode* 31);
List theProposedMetricState;
theProposedMetricState = (((this.proposedMetricState!= null)&&(!this.proposedMetricState.isEmpty()))?this.getProposedMetricState():null);
if ((this.proposedMetricState!= null)&&(!this.proposedMetricState.isEmpty())) {
currentHashCode += theProposedMetricState.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);
{
List theProposedMetricState;
theProposedMetricState = (((this.proposedMetricState!= null)&&(!this.proposedMetricState.isEmpty()))?this.getProposedMetricState():null);
strategy.appendField(locator, this, "proposedMetricState", buffer, theProposedMetricState, ((this.proposedMetricState!= null)&&(!this.proposedMetricState.isEmpty())));
}
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 SetMetricState) {
final SetMetricState copy = ((SetMetricState) draftCopy);
{
Boolean proposedMetricStateShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.proposedMetricState!= null)&&(!this.proposedMetricState.isEmpty())));
if (proposedMetricStateShouldBeCopiedAndSet == Boolean.TRUE) {
List sourceProposedMetricState;
sourceProposedMetricState = (((this.proposedMetricState!= null)&&(!this.proposedMetricState.isEmpty()))?this.getProposedMetricState():null);
@SuppressWarnings("unchecked")
List copyProposedMetricState = ((List ) strategy.copy(LocatorUtils.property(locator, "proposedMetricState", sourceProposedMetricState), sourceProposedMetricState, ((this.proposedMetricState!= null)&&(!this.proposedMetricState.isEmpty()))));
copy.setProposedMetricState(copyProposedMetricState);
} else {
if (proposedMetricStateShouldBeCopiedAndSet == Boolean.FALSE) {
copy.proposedMetricState = null;
}
}
}
}
return draftCopy;
}
@Override
public Object createNewInstance() {
return new SetMetricState();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy