org.hl7.fhir.LocationPosition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quick Show documentation
Show all versions of quick Show documentation
The quick library for the Clinical Quality Language Java reference implementation
//
// This file was generated by the Eclipse Implementation of JAXB, v3.0.2
// See https://eclipse-ee4j.github.io/jaxb-ri
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2024.01.18 at 08:26:13 AM MST
//
package org.hl7.fhir;
import java.util.Collection;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.HashCode2;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated.
*
* Java class for Location.Position complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Location.Position">
* <complexContent>
* <extension base="{http://hl7.org/fhir}BackboneElement">
* <sequence>
* <element name="longitude" type="{http://hl7.org/fhir}decimal"/>
* <element name="latitude" type="{http://hl7.org/fhir}decimal"/>
* <element name="altitude" type="{http://hl7.org/fhir}decimal" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Location.Position", propOrder = {
"longitude",
"latitude",
"altitude"
})
public class LocationPosition
extends BackboneElement
implements Equals2, HashCode2, ToString2
{
@XmlElement(required = true)
protected Decimal longitude;
@XmlElement(required = true)
protected Decimal latitude;
protected Decimal altitude;
/**
* Gets the value of the longitude property.
*
* @return
* possible object is
* {@link Decimal }
*
*/
public Decimal getLongitude() {
return longitude;
}
/**
* Sets the value of the longitude property.
*
* @param value
* allowed object is
* {@link Decimal }
*
*/
public void setLongitude(Decimal value) {
this.longitude = value;
}
/**
* Gets the value of the latitude property.
*
* @return
* possible object is
* {@link Decimal }
*
*/
public Decimal getLatitude() {
return latitude;
}
/**
* Sets the value of the latitude property.
*
* @param value
* allowed object is
* {@link Decimal }
*
*/
public void setLatitude(Decimal value) {
this.latitude = value;
}
/**
* Gets the value of the altitude property.
*
* @return
* possible object is
* {@link Decimal }
*
*/
public Decimal getAltitude() {
return altitude;
}
/**
* Sets the value of the altitude property.
*
* @param value
* allowed object is
* {@link Decimal }
*
*/
public void setAltitude(Decimal value) {
this.altitude = value;
}
public LocationPosition withLongitude(Decimal value) {
setLongitude(value);
return this;
}
public LocationPosition withLatitude(Decimal value) {
setLatitude(value);
return this;
}
public LocationPosition withAltitude(Decimal value) {
setAltitude(value);
return this;
}
@Override
public LocationPosition withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public LocationPosition withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public LocationPosition withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public LocationPosition withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public LocationPosition withId(java.lang.String value) {
setId(value);
return this;
}
@Override
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
if (!super.equals(thisLocator, thatLocator, object, strategy)) {
return false;
}
final LocationPosition that = ((LocationPosition) object);
{
Decimal lhsLongitude;
lhsLongitude = this.getLongitude();
Decimal rhsLongitude;
rhsLongitude = that.getLongitude();
if (!strategy.equals(LocatorUtils.property(thisLocator, "longitude", lhsLongitude), LocatorUtils.property(thatLocator, "longitude", rhsLongitude), lhsLongitude, rhsLongitude, (this.longitude!= null), (that.longitude!= null))) {
return false;
}
}
{
Decimal lhsLatitude;
lhsLatitude = this.getLatitude();
Decimal rhsLatitude;
rhsLatitude = that.getLatitude();
if (!strategy.equals(LocatorUtils.property(thisLocator, "latitude", lhsLatitude), LocatorUtils.property(thatLocator, "latitude", rhsLatitude), lhsLatitude, rhsLatitude, (this.latitude!= null), (that.latitude!= null))) {
return false;
}
}
{
Decimal lhsAltitude;
lhsAltitude = this.getAltitude();
Decimal rhsAltitude;
rhsAltitude = that.getAltitude();
if (!strategy.equals(LocatorUtils.property(thisLocator, "altitude", lhsAltitude), LocatorUtils.property(thatLocator, "altitude", rhsAltitude), lhsAltitude, rhsAltitude, (this.altitude!= null), (that.altitude!= null))) {
return false;
}
}
return true;
}
@Override
public boolean equals(Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.getInstance();
return equals(null, null, object, strategy);
}
@Override
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) {
int currentHashCode = super.hashCode(locator, strategy);
{
Decimal theLongitude;
theLongitude = this.getLongitude();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "longitude", theLongitude), currentHashCode, theLongitude, (this.longitude!= null));
}
{
Decimal theLatitude;
theLatitude = this.getLatitude();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "latitude", theLatitude), currentHashCode, theLatitude, (this.latitude!= null));
}
{
Decimal theAltitude;
theAltitude = this.getAltitude();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "altitude", theAltitude), currentHashCode, theAltitude, (this.altitude!= null));
}
return currentHashCode;
}
@Override
public int hashCode() {
final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.getInstance();
return this.hashCode(null, strategy);
}
@Override
public java.lang.String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.getInstance();
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
@Override
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 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, ToStringStrategy2 strategy) {
super.appendFields(locator, buffer, strategy);
{
Decimal theLongitude;
theLongitude = this.getLongitude();
strategy.appendField(locator, this, "longitude", buffer, theLongitude, (this.longitude!= null));
}
{
Decimal theLatitude;
theLatitude = this.getLatitude();
strategy.appendField(locator, this, "latitude", buffer, theLatitude, (this.latitude!= null));
}
{
Decimal theAltitude;
theAltitude = this.getAltitude();
strategy.appendField(locator, this, "altitude", buffer, theAltitude, (this.altitude!= null));
}
return buffer;
}
}