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 single turn-by-turn route instruction or advisory formatted for presentation.

Java class for RouteInstructionType complex type.

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

 <complexType name="RouteInstructionType">
   <complexContent>
     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
       <sequence>
         <element name="Instruction" type="{http://www.w3.org/2001/XMLSchema}string"/>
         <element name="distance" type="{http://www.opengis.net/xls}DistanceType"/>
         <element name="RouteInstructionGeometry" type="{http://www.opengis.net/xls}RouteGeometryType" minOccurs="0"/>
         <element name="BoundingBox" type="{http://www.opengis.net/gml}EnvelopeType" minOccurs="0"/>
       </sequence>
       <attribute name="duration" use="required" type="{http://www.w3.org/2001/XMLSchema}duration" />
       <attribute name="description" type="{http://www.w3.org/2001/XMLSchema}string" />
     </restriction>
   </complexContent>
 </complexType>
 
 
 @XmlType(name = "RouteInstructionType", propOrder = {
     "instruction",
     "distance",
     "routeInstructionGeometry",
     "boundingBox"
 })
 public class RouteInstructionType
     implements CloneableCopyToEqualsHashCodeMergeFromToString
 {
 
     @XmlElement(name = "Instruction", required = true)
     protected String instruction;
     @XmlElement(required = true)
     protected DistanceType distance;
     @XmlElement(name = "RouteInstructionGeometry")
     @XmlElement(name = "BoundingBox")
     protected EnvelopeType boundingBox;
     @XmlAttribute(name = "duration", required = true)
     protected Duration duration;
     @XmlAttribute(name = "description")
     protected String description;

    
Gets the value of the instruction property.

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

    
Sets the value of the instruction property.

Parameters:
value allowed object is
    public void setInstruction(String 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;
    }

    
Gets the value of the routeInstructionGeometry property.

Returns:
possible object is
        return ;
    }

    
Sets the value of the routeInstructionGeometry property.

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

    
Gets the value of the boundingBox property.

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

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

    
Sets the value of the duration property.

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

    
Gets the value of the description property.

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

    
Sets the value of the description property.

Parameters:
value allowed object is
    public void setDescription(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) {
        {
            String theInstruction;
            theInstruction = this.getInstruction();
            strategy.appendField(locatorthis"instruction"buffertheInstruction);
        }
        {
            DistanceType theDistance;
            theDistance = this.getDistance();
            strategy.appendField(locatorthis"distance"buffertheDistance);
        }
        {
            RouteGeometryType theRouteInstructionGeometry;
            theRouteInstructionGeometry = this.getRouteInstructionGeometry();
            strategy.appendField(locatorthis"routeInstructionGeometry"buffertheRouteInstructionGeometry);
        }
        {
            EnvelopeType theBoundingBox;
            theBoundingBox = this.getBoundingBox();
            strategy.appendField(locatorthis"boundingBox"buffertheBoundingBox);
        }
        {
            Duration theDuration;
            theDuration = this.getDuration();
            strategy.appendField(locatorthis"duration"buffertheDuration);
        }
        {
            String theDescription;
            theDescription = this.getDescription();
            strategy.appendField(locatorthis"description"buffertheDescription);
        }
        return buffer;
    }
    public boolean equals(ObjectLocator thisLocatorObjectLocator thatLocatorObject objectEqualsStrategy strategy) {
        if (!(object instanceof RouteInstructionType)) {
            return false;
        }
        if (this == object) {
            return true;
        }
        final RouteInstructionType that = ((RouteInstructionTypeobject);
        {
            String lhsInstruction;
            lhsInstruction = this.getInstruction();
            String rhsInstruction;
            rhsInstruction = that.getInstruction();
            if (!strategy.equals(LocatorUtils.property(thisLocator"instruction"lhsInstruction), LocatorUtils.property(thatLocator"instruction"rhsInstruction), lhsInstructionrhsInstruction)) {
                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;
            }
        }
        {
            RouteGeometryType lhsRouteInstructionGeometry;
            lhsRouteInstructionGeometry = this.getRouteInstructionGeometry();
            RouteGeometryType rhsRouteInstructionGeometry;
            rhsRouteInstructionGeometry = that.getRouteInstructionGeometry();
            if (!strategy.equals(LocatorUtils.property(thisLocator"routeInstructionGeometry"lhsRouteInstructionGeometry), LocatorUtils.property(thatLocator"routeInstructionGeometry"rhsRouteInstructionGeometry), lhsRouteInstructionGeometryrhsRouteInstructionGeometry)) {
                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;
            }
        }
        {
            Duration lhsDuration;
            lhsDuration = this.getDuration();
            Duration rhsDuration;
            rhsDuration = that.getDuration();
            if (!strategy.equals(LocatorUtils.property(thisLocator"duration"lhsDuration), LocatorUtils.property(thatLocator"duration"rhsDuration), lhsDurationrhsDuration)) {
                return false;
            }
        }
        {
            String lhsDescription;
            lhsDescription = this.getDescription();
            String rhsDescription;
            rhsDescription = that.getDescription();
            if (!strategy.equals(LocatorUtils.property(thisLocator"description"lhsDescription), LocatorUtils.property(thatLocator"description"rhsDescription), lhsDescriptionrhsDescription)) {
                return false;
            }
        }
        return true;
    }
    public boolean equals(Object object) {
        final EqualsStrategy strategy = .;
        return equals(nullnullobjectstrategy);
    }
    public int hashCode(ObjectLocator locatorHashCodeStrategy strategy) {
        int currentHashCode = 1;
        {
            String theInstruction;
            theInstruction = this.getInstruction();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"instruction"theInstruction), currentHashCodetheInstruction);
        }
        {
            DistanceType theDistance;
            theDistance = this.getDistance();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"distance"theDistance), currentHashCodetheDistance);
        }
        {
            RouteGeometryType theRouteInstructionGeometry;
            theRouteInstructionGeometry = this.getRouteInstructionGeometry();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"routeInstructionGeometry"theRouteInstructionGeometry), currentHashCodetheRouteInstructionGeometry);
        }
        {
            EnvelopeType theBoundingBox;
            theBoundingBox = this.getBoundingBox();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"boundingBox"theBoundingBox), currentHashCodetheBoundingBox);
        }
        {
            Duration theDuration;
            theDuration = this.getDuration();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"duration"theDuration), currentHashCodetheDuration);
        }
        {
            String theDescription;
            theDescription = this.getDescription();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"description"theDescription), currentHashCodetheDescription);
        }
        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 RouteInstructionType) {
            final RouteInstructionType copy = ((RouteInstructionTypedraftCopy);
            if (this.!= null) {
                String sourceInstruction;
                sourceInstruction = this.getInstruction();
                String copyInstruction = ((Stringstrategy.copy(LocatorUtils.property(locator"instruction"sourceInstruction), sourceInstruction));
                copy.setInstruction(copyInstruction);
            } else {
                copy.instruction = 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;
            }
            if (this.!= null) {
                RouteGeometryType sourceRouteInstructionGeometry;
                sourceRouteInstructionGeometry = this.getRouteInstructionGeometry();
                RouteGeometryType copyRouteInstructionGeometry = ((RouteGeometryTypestrategy.copy(LocatorUtils.property(locator"routeInstructionGeometry"sourceRouteInstructionGeometry), sourceRouteInstructionGeometry));
                copy.setRouteInstructionGeometry(copyRouteInstructionGeometry);
            } else {
                copy.routeInstructionGeometry = 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) {
                Duration sourceDuration;
                sourceDuration = this.getDuration();
                Duration copyDuration = ((Durationstrategy.copy(LocatorUtils.property(locator"duration"sourceDuration), sourceDuration));
                copy.setDuration(copyDuration);
            } else {
                copy.duration = null;
            }
            if (this.!= null) {
                String sourceDescription;
                sourceDescription = this.getDescription();
                String copyDescription = ((Stringstrategy.copy(LocatorUtils.property(locator"description"sourceDescription), sourceDescription));
                copy.setDescription(copyDescription);
            } else {
                copy.description = null;
            }
        }
        return draftCopy;
    }
    public Object createNewInstance() {
        return new RouteInstructionType();
    }
    public void mergeFrom(Object leftObject right) {
        final MergeStrategy strategy = .;
        mergeFrom(nullnullleftrightstrategy);
    }
    public void mergeFrom(ObjectLocator leftLocatorObjectLocator rightLocatorObject leftObject rightMergeStrategy strategy) {
        if (right instanceof RouteInstructionType) {
            final RouteInstructionType target = this;
            final RouteInstructionType leftObject = ((RouteInstructionTypeleft);
            final RouteInstructionType rightObject = ((RouteInstructionTyperight);
            {
                String lhsInstruction;
                lhsInstruction = leftObject.getInstruction();
                String rhsInstruction;
                rhsInstruction = rightObject.getInstruction();
                target.setInstruction(((Stringstrategy.merge(LocatorUtils.property(leftLocator"instruction"lhsInstruction), LocatorUtils.property(rightLocator"instruction"rhsInstruction), lhsInstructionrhsInstruction)));
            }
            {
                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)));
            }
            {
                RouteGeometryType lhsRouteInstructionGeometry;
                lhsRouteInstructionGeometry = leftObject.getRouteInstructionGeometry();
                RouteGeometryType rhsRouteInstructionGeometry;
                rhsRouteInstructionGeometry = rightObject.getRouteInstructionGeometry();
                target.setRouteInstructionGeometry(((RouteGeometryTypestrategy.merge(LocatorUtils.property(leftLocator"routeInstructionGeometry"lhsRouteInstructionGeometry), LocatorUtils.property(rightLocator"routeInstructionGeometry"rhsRouteInstructionGeometry), lhsRouteInstructionGeometryrhsRouteInstructionGeometry)));
            }
            {
                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)));
            }
            {
                Duration lhsDuration;
                lhsDuration = leftObject.getDuration();
                Duration rhsDuration;
                rhsDuration = rightObject.getDuration();
                target.setDuration(((Durationstrategy.merge(LocatorUtils.property(leftLocator"duration"lhsDuration), LocatorUtils.property(rightLocator"duration"rhsDuration), lhsDurationrhsDuration)));
            }
            {
                String lhsDescription;
                lhsDescription = leftObject.getDescription();
                String rhsDescription;
                rhsDescription = rightObject.getDescription();
                target.setDescription(((Stringstrategy.merge(LocatorUtils.property(leftLocator"description"lhsDescription), LocatorUtils.property(rightLocator"description"rhsDescription), lhsDescriptionrhsDescription)));
            }
        }
    }
New to GrepCode? Check out our FAQ X