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;
 
Defines a POI and its distance from a predetermined point.

Java class for POIWithDistanceType complex type.

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

 <complexType name="POIWithDistanceType">
   <complexContent>
     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
       <sequence>
         <element ref="{http://www.opengis.net/xls}POI"/>
         <element ref="{http://www.opengis.net/xls}Distance" minOccurs="0"/>
       </sequence>
     </restriction>
   </complexContent>
 </complexType>
 
 
 @XmlType(name = "POIWithDistanceType", propOrder = {
     "poi",
     "distance"
 })
 public class POIWithDistanceType
     implements CloneableCopyToEqualsHashCodeMergeFromToString
 {
 
     @XmlElement(name = "POI", required = true)
     protected PointOfInterestType poi;
     @XmlElement(name = "Distance")
     protected DistanceType distance;

    
Gets the value of the poi property.

Returns:
possible object is
 
     public PointOfInterestType getPOI() {
         return ;
     }

    
Sets the value of the poi property.

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

    
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;
    }
    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) {
        {
            PointOfInterestType thePOI;
            thePOI = this.getPOI();
            strategy.appendField(locatorthis"poi"bufferthePOI);
        }
        {
            DistanceType theDistance;
            theDistance = this.getDistance();
            strategy.appendField(locatorthis"distance"buffertheDistance);
        }
        return buffer;
    }
    public boolean equals(ObjectLocator thisLocatorObjectLocator thatLocatorObject objectEqualsStrategy strategy) {
        if (!(object instanceof POIWithDistanceType)) {
            return false;
        }
        if (this == object) {
            return true;
        }
        final POIWithDistanceType that = ((POIWithDistanceTypeobject);
        {
            PointOfInterestType lhsPOI;
            lhsPOI = this.getPOI();
            PointOfInterestType rhsPOI;
            rhsPOI = that.getPOI();
            if (!strategy.equals(LocatorUtils.property(thisLocator"poi"lhsPOI), LocatorUtils.property(thatLocator"poi"rhsPOI), lhsPOIrhsPOI)) {
                return false;
            }
        }
        {
            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;
            }
        }
        return true;
    }
    public boolean equals(Object object) {
        final EqualsStrategy strategy = .;
        return equals(nullnullobjectstrategy);
    }
    public int hashCode(ObjectLocator locatorHashCodeStrategy strategy) {
        int currentHashCode = 1;
        {
            PointOfInterestType thePOI;
            thePOI = this.getPOI();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"poi"thePOI), currentHashCodethePOI);
        }
        {
            DistanceType theDistance;
            theDistance = this.getDistance();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"distance"theDistance), currentHashCodetheDistance);
        }
        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 POIWithDistanceType) {
            final POIWithDistanceType copy = ((POIWithDistanceTypedraftCopy);
            if (this.!= null) {
                PointOfInterestType sourcePOI;
                sourcePOI = this.getPOI();
                PointOfInterestType copyPOI = ((PointOfInterestTypestrategy.copy(LocatorUtils.property(locator"poi"sourcePOI), sourcePOI));
                copy.setPOI(copyPOI);
            } else {
                copy.poi = null;
            }
            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;
            }
        }
        return draftCopy;
    }
    public Object createNewInstance() {
        return new POIWithDistanceType();
    }
    public void mergeFrom(Object leftObject right) {
        final MergeStrategy strategy = .;
        mergeFrom(nullnullleftrightstrategy);
    }
    public void mergeFrom(ObjectLocator leftLocatorObjectLocator rightLocatorObject leftObject rightMergeStrategy strategy) {
        if (right instanceof POIWithDistanceType) {
            final POIWithDistanceType target = this;
            final POIWithDistanceType leftObject = ((POIWithDistanceTypeleft);
            final POIWithDistanceType rightObject = ((POIWithDistanceTyperight);
            {
                PointOfInterestType lhsPOI;
                lhsPOI = leftObject.getPOI();
                PointOfInterestType rhsPOI;
                rhsPOI = rightObject.getPOI();
                target.setPOI(((PointOfInterestTypestrategy.merge(LocatorUtils.property(leftLocator"poi"lhsPOI), LocatorUtils.property(rightLocator"poi"rhsPOI), lhsPOIrhsPOI)));
            }
            {
                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)));
            }
        }
    }
New to GrepCode? Check out our FAQ X