Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  //
  // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2 
  // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
  // Any modifications to this file will be lost upon recompilation of the source schema. 
  // Generated on: 2011.02.20 at 01:29:24 PM MEZ 
  //
  
  
  package net.opengis.xls.v_1_1_0;
 

Java class for HorAccType complex type.

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

 <complexType name="HorAccType">
   <complexContent>
     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
       <choice>
         <element ref="{http://www.opengis.net/xls}Distance"/>
         <element ref="{http://www.opengis.net/xls}Angle"/>
       </choice>
     </restriction>
   </complexContent>
 </complexType>
 
 
 @XmlType(name = "HorAccType", propOrder = {
     "distance",
     "angle"
 })
 public class HorAccType
     implements CloneableCopyToEqualsHashCodeMergeFromToString
 {
 
     @XmlElement(name = "Distance")
     protected DistanceType distance;
     @XmlElement(name = "Angle")
     protected AngleType angle;

    
Gets the value of the distance property.

Returns:
possible object is
 
     public DistanceType getDistance() {
         return ;
     }

    
Sets the value of the distance property.

Parameters:
value allowed object is
 
     public void setDistance(DistanceType value) {
         this. = value;
     }

    
Gets the value of the angle property.

Returns:
possible object is
 
    public AngleType getAngle() {
        return ;
    }

    
Sets the value of the angle property.

Parameters:
value allowed object is
    public void setAngle(AngleType value) {
        this. = value;
    }
    public String toString() {
        final ToStringStrategy strategy = .;
        final StringBuilder buffer = new StringBuilder();
        append(nullbufferstrategy);
        return buffer.toString();
    }
    public StringBuilder append(ObjectLocator locatorStringBuilder bufferToStringStrategy strategy) {
        strategy.appendStart(locatorthisbuffer);
        appendFields(locatorbufferstrategy);
        strategy.appendEnd(locatorthisbuffer);
        return buffer;
    }
    public StringBuilder appendFields(ObjectLocator locatorStringBuilder bufferToStringStrategy strategy) {
        {
            DistanceType theDistance;
            theDistance = this.getDistance();
            strategy.appendField(locatorthis"distance"buffertheDistance);
        }
        {
            AngleType theAngle;
            theAngle = this.getAngle();
            strategy.appendField(locatorthis"angle"buffertheAngle);
        }
        return buffer;
    }
    public boolean equals(ObjectLocator thisLocatorObjectLocator thatLocatorObject objectEqualsStrategy strategy) {
        if (!(object instanceof HorAccType)) {
            return false;
        }
        if (this == object) {
            return true;
        }
        final HorAccType that = ((HorAccTypeobject);
        {
            DistanceType lhsDistance;
            lhsDistance = this.getDistance();
            DistanceType rhsDistance;
            rhsDistance = that.getDistance();
            if (!strategy.equals(LocatorUtils.property(thisLocator"distance"lhsDistance), LocatorUtils.property(thatLocator"distance"rhsDistance), lhsDistancerhsDistance)) {
                return false;
            }
        }
        {
            AngleType lhsAngle;
            lhsAngle = this.getAngle();
            AngleType rhsAngle;
            rhsAngle = that.getAngle();
            if (!strategy.equals(LocatorUtils.property(thisLocator"angle"lhsAngle), LocatorUtils.property(thatLocator"angle"rhsAngle), lhsAnglerhsAngle)) {
                return false;
            }
        }
        return true;
    }
    public boolean equals(Object object) {
        final EqualsStrategy strategy = .;
        return equals(nullnullobjectstrategy);
    }
    public int hashCode(ObjectLocator locatorHashCodeStrategy strategy) {
        int currentHashCode = 1;
        {
            DistanceType theDistance;
            theDistance = this.getDistance();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"distance"theDistance), currentHashCodetheDistance);
        }
        {
            AngleType theAngle;
            theAngle = this.getAngle();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"angle"theAngle), currentHashCodetheAngle);
        }
        return currentHashCode;
    }
    public int hashCode() {
        final HashCodeStrategy strategy = .;
        return this.hashCode(nullstrategy);
    }
    public Object clone() {
        return copyTo(createNewInstance());
    }
    public Object copyTo(Object target) {
        final CopyStrategy strategy = .;
        return copyTo(nulltargetstrategy);
    }
    public Object copyTo(ObjectLocator locatorObject targetCopyStrategy strategy) {
        final Object draftCopy = ((target == null)?createNewInstance():target);
        if (draftCopy instanceof HorAccType) {
            final HorAccType copy = ((HorAccTypedraftCopy);
            if (this.!= null) {
                DistanceType sourceDistance;
                sourceDistance = this.getDistance();
                DistanceType copyDistance = ((DistanceTypestrategy.copy(LocatorUtils.property(locator"distance"sourceDistance), sourceDistance));
                copy.setDistance(copyDistance);
            } else {
                copy.distance = null;
            }
            if (this.!= null) {
                AngleType sourceAngle;
                sourceAngle = this.getAngle();
                AngleType copyAngle = ((AngleTypestrategy.copy(LocatorUtils.property(locator"angle"sourceAngle), sourceAngle));
                copy.setAngle(copyAngle);
            } else {
                copy.angle = null;
            }
        }
        return draftCopy;
    }
    public Object createNewInstance() {
        return new HorAccType();
    }
    public void mergeFrom(Object leftObject right) {
        final MergeStrategy strategy = .;
        mergeFrom(nullnullleftrightstrategy);
    }
    public void mergeFrom(ObjectLocator leftLocatorObjectLocator rightLocatorObject leftObject rightMergeStrategy strategy) {
        if (right instanceof HorAccType) {
            final HorAccType target = this;
            final HorAccType leftObject = ((HorAccTypeleft);
            final HorAccType rightObject = ((HorAccTyperight);
            {
                DistanceType lhsDistance;
                lhsDistance = leftObject.getDistance();
                DistanceType rhsDistance;
                rhsDistance = rightObject.getDistance();
                target.setDistance(((DistanceTypestrategy.merge(LocatorUtils.property(leftLocator"distance"lhsDistance), LocatorUtils.property(rightLocator"distance"rhsDistance), lhsDistancerhsDistance)));
            }
            {
                AngleType lhsAngle;
                lhsAngle = leftObject.getAngle();
                AngleType rhsAngle;
                rhsAngle = rightObject.getAngle();
                target.setAngle(((AngleTypestrategy.merge(LocatorUtils.property(leftLocator"angle"lhsAngle), LocatorUtils.property(rightLocator"angle"rhsAngle), lhsAnglerhsAngle)));
            }
        }
    }
New to GrepCode? Check out our FAQ X