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: 2010.09.03 at 10:11:56 AM MESZ 
  //
  
  
  package net.opengis.xls.v_1_1_0;
 
Defines the characteristics of a segment along a route.

Java class for AbstractRouteSegmentType complex type.

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

 <complexType name="AbstractRouteSegmentType">
   <complexContent>
     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
       <sequence>
         <element ref="{http://www.opengis.net/xls}Distance"/>
         <element name="TravelTime" type="{http://www.w3.org/2001/XMLSchema}duration"/>
         <element ref="{http://www.opengis.net/xls}BoundingBox"/>
       </sequence>
       <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
     </restriction>
   </complexContent>
 </complexType>
 
 
 @XmlType(name = "AbstractRouteSegmentType", propOrder = {
     "distance",
     "travelTime",
     "boundingBox"
 })
     RouteSegmentType.class
 })
 public abstract class AbstractRouteSegmentType
     implements CloneableCopyToEqualsHashCodeMergeFromToString
 {
 
     @XmlElement(name = "Distance", required = true)
     protected DistanceType distance;
     @XmlElement(name = "TravelTime", required = true)
     protected Duration travelTime;
     @XmlElement(name = "BoundingBox", required = true)
     protected EnvelopeType boundingBox;
     @XmlAttribute(name = "name")
     protected String name;

    
Distance along the segment.

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 travelTime property.

Returns:
possible object is
    public Duration getTravelTime() {
        return ;
    }

    
Sets the value of the travelTime property.

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

    
Rectangular area bounding the segment.

Returns:
possible object is
    public EnvelopeType getBoundingBox() {
        return ;
    }

    
Sets the value of the boundingBox property.

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

    
Gets the value of the name property.

Returns:
possible object is
    public String getName() {
        return ;
    }

    
Sets the value of the name property.

Parameters:
value allowed object is
    public void setName(String 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);
        }
        {
            Duration theTravelTime;
            theTravelTime = this.getTravelTime();
            strategy.appendField(locatorthis"travelTime"buffertheTravelTime);
        }
        {
            EnvelopeType theBoundingBox;
            theBoundingBox = this.getBoundingBox();
            strategy.appendField(locatorthis"boundingBox"buffertheBoundingBox);
        }
        {
            String theName;
            theName = this.getName();
            strategy.appendField(locatorthis"name"buffertheName);
        }
        return buffer;
    }
    public boolean equals(ObjectLocator thisLocatorObjectLocator thatLocatorObject objectEqualsStrategy strategy) {
        if (!(object instanceof AbstractRouteSegmentType)) {
            return false;
        }
        if (this == object) {
            return true;
        }
        final AbstractRouteSegmentType that = ((AbstractRouteSegmentTypeobject);
        {
            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;
            }
        }
        {
            Duration lhsTravelTime;
            lhsTravelTime = this.getTravelTime();
            Duration rhsTravelTime;
            rhsTravelTime = that.getTravelTime();
            if (!strategy.equals(LocatorUtils.property(thisLocator"travelTime"lhsTravelTime), LocatorUtils.property(thatLocator"travelTime"rhsTravelTime), lhsTravelTimerhsTravelTime)) {
                return false;
            }
        }
        {
            EnvelopeType lhsBoundingBox;
            lhsBoundingBox = this.getBoundingBox();
            EnvelopeType rhsBoundingBox;
            rhsBoundingBox = that.getBoundingBox();
            if (!strategy.equals(LocatorUtils.property(thisLocator"boundingBox"lhsBoundingBox), LocatorUtils.property(thatLocator"boundingBox"rhsBoundingBox), lhsBoundingBoxrhsBoundingBox)) {
                return false;
            }
        }
        {
            String lhsName;
            lhsName = this.getName();
            String rhsName;
            rhsName = that.getName();
            if (!strategy.equals(LocatorUtils.property(thisLocator"name"lhsName), LocatorUtils.property(thatLocator"name"rhsName), lhsNamerhsName)) {
                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);
        }
        {
            Duration theTravelTime;
            theTravelTime = this.getTravelTime();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"travelTime"theTravelTime), currentHashCodetheTravelTime);
        }
        {
            EnvelopeType theBoundingBox;
            theBoundingBox = this.getBoundingBox();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"boundingBox"theBoundingBox), currentHashCodetheBoundingBox);
        }
        {
            String theName;
            theName = this.getName();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"name"theName), currentHashCodetheName);
        }
        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) {
        if (null == target) {
            throw new IllegalArgumentException("Target argument must not be null for abstract copyable classes.");
        }
        if (target instanceof AbstractRouteSegmentType) {
            final AbstractRouteSegmentType copy = ((AbstractRouteSegmentTypetarget);
            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) {
                Duration sourceTravelTime;
                sourceTravelTime = this.getTravelTime();
                Duration copyTravelTime = ((Durationstrategy.copy(LocatorUtils.property(locator"travelTime"sourceTravelTime), sourceTravelTime));
                copy.setTravelTime(copyTravelTime);
            } else {
                copy.travelTime = null;
            }
            if (this.!= null) {
                EnvelopeType sourceBoundingBox;
                sourceBoundingBox = this.getBoundingBox();
                EnvelopeType copyBoundingBox = ((EnvelopeTypestrategy.copy(LocatorUtils.property(locator"boundingBox"sourceBoundingBox), sourceBoundingBox));
                copy.setBoundingBox(copyBoundingBox);
            } else {
                copy.boundingBox = null;
            }
            if (this.!= null) {
                String sourceName;
                sourceName = this.getName();
                String copyName = ((Stringstrategy.copy(LocatorUtils.property(locator"name"sourceName), sourceName));
                copy.setName(copyName);
            } else {
                copy.name = null;
            }
        }
        return target;
    }
    public void mergeFrom(Object leftObject right) {
        final MergeStrategy strategy = .;
        mergeFrom(nullnullleftrightstrategy);
    }
    public void mergeFrom(ObjectLocator leftLocatorObjectLocator rightLocatorObject leftObject rightMergeStrategy strategy) {
        if (right instanceof AbstractRouteSegmentType) {
            final AbstractRouteSegmentType target = this;
            final AbstractRouteSegmentType leftObject = ((AbstractRouteSegmentTypeleft);
            final AbstractRouteSegmentType rightObject = ((AbstractRouteSegmentTyperight);
            {
                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)));
            }
            {
                Duration lhsTravelTime;
                lhsTravelTime = leftObject.getTravelTime();
                Duration rhsTravelTime;
                rhsTravelTime = rightObject.getTravelTime();
                target.setTravelTime(((Durationstrategy.merge(LocatorUtils.property(leftLocator"travelTime"lhsTravelTime), LocatorUtils.property(rightLocator"travelTime"rhsTravelTime), lhsTravelTimerhsTravelTime)));
            }
            {
                EnvelopeType lhsBoundingBox;
                lhsBoundingBox = leftObject.getBoundingBox();
                EnvelopeType rhsBoundingBox;
                rhsBoundingBox = rightObject.getBoundingBox();
                target.setBoundingBox(((EnvelopeTypestrategy.merge(LocatorUtils.property(leftLocator"boundingBox"lhsBoundingBox), LocatorUtils.property(rightLocator"boundingBox"rhsBoundingBox), lhsBoundingBoxrhsBoundingBox)));
            }
            {
                String lhsName;
                lhsName = leftObject.getName();
                String rhsName;
                rhsName = rightObject.getName();
                target.setName(((Stringstrategy.merge(LocatorUtils.property(leftLocator"name"lhsName), LocatorUtils.property(rightLocator"name"rhsName), lhsNamerhsName)));
            }
        }
    }
New to GrepCode? Check out our FAQ X