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;
 
The NamedPlaceType defines a named place within an AddressType. A named place has a classification (such as country, country subdivision, or municipality).

Java class for NamedPlaceType complex type.

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

 <complexType name="NamedPlaceType">
   <simpleContent>
     <extension base="<http://www.w3.org/2001/XMLSchema>string">
       <attribute name="type" use="required" type="{http://www.opengis.net/xls}NamedPlaceClassification" />
     </extension>
   </simpleContent>
 </complexType>
 
 
 @XmlType(name = "NamedPlaceType", propOrder = {
     "value"
 })
 public class NamedPlaceType
     implements CloneableCopyToEqualsHashCodeMergeFromToString
 {
 
     @XmlValue
     protected String value;
     @XmlAttribute(name = "type", required = true)
     protected NamedPlaceClassification type;

    
Gets the value of the value property.

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

    
Sets the value of the value property.

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

    
Gets the value of the type property.

Returns:
possible object is
    public NamedPlaceClassification getType() {
        return ;
    }

    
Sets the value of the type property.

Parameters:
value allowed object is
    public void setType(NamedPlaceClassification 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 theValue;
            theValue = this.getValue();
            strategy.appendField(locatorthis"value"buffertheValue);
        }
        {
            NamedPlaceClassification theType;
            theType = this.getType();
            strategy.appendField(locatorthis"type"buffertheType);
        }
        return buffer;
    }
    public boolean equals(ObjectLocator thisLocatorObjectLocator thatLocatorObject objectEqualsStrategy strategy) {
        if (!(object instanceof NamedPlaceType)) {
            return false;
        }
        if (this == object) {
            return true;
        }
        final NamedPlaceType that = ((NamedPlaceTypeobject);
        {
            String lhsValue;
            lhsValue = this.getValue();
            String rhsValue;
            rhsValue = that.getValue();
            if (!strategy.equals(LocatorUtils.property(thisLocator"value"lhsValue), LocatorUtils.property(thatLocator"value"rhsValue), lhsValuerhsValue)) {
                return false;
            }
        }
        {
            NamedPlaceClassification lhsType;
            lhsType = this.getType();
            NamedPlaceClassification rhsType;
            rhsType = that.getType();
            if (!strategy.equals(LocatorUtils.property(thisLocator"type"lhsType), LocatorUtils.property(thatLocator"type"rhsType), lhsTyperhsType)) {
                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 theValue;
            theValue = this.getValue();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"value"theValue), currentHashCodetheValue);
        }
        {
            NamedPlaceClassification theType;
            theType = this.getType();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator"type"theType), currentHashCodetheType);
        }
        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 NamedPlaceType) {
            final NamedPlaceType copy = ((NamedPlaceTypedraftCopy);
            if (this.!= null) {
                String sourceValue;
                sourceValue = this.getValue();
                String copyValue = ((Stringstrategy.copy(LocatorUtils.property(locator"value"sourceValue), sourceValue));
                copy.setValue(copyValue);
            } else {
                copy.value = null;
            }
            if (this.!= null) {
                NamedPlaceClassification sourceType;
                sourceType = this.getType();
                NamedPlaceClassification copyType = ((NamedPlaceClassificationstrategy.copy(LocatorUtils.property(locator"type"sourceType), sourceType));
                copy.setType(copyType);
            } else {
                copy.type = null;
            }
        }
        return draftCopy;
    }
    public Object createNewInstance() {
        return new NamedPlaceType();
    }
    public void mergeFrom(Object leftObject right) {
        final MergeStrategy strategy = .;
        mergeFrom(nullnullleftrightstrategy);
    }
    public void mergeFrom(ObjectLocator leftLocatorObjectLocator rightLocatorObject leftObject rightMergeStrategy strategy) {
        if (right instanceof NamedPlaceType) {
            final NamedPlaceType target = this;
            final NamedPlaceType leftObject = ((NamedPlaceTypeleft);
            final NamedPlaceType rightObject = ((NamedPlaceTyperight);
            {
                String lhsValue;
                lhsValue = leftObject.getValue();
                String rhsValue;
                rhsValue = rightObject.getValue();
                target.setValue(((Stringstrategy.merge(LocatorUtils.property(leftLocator"value"lhsValue), LocatorUtils.property(rightLocator"value"rhsValue), lhsValuerhsValue)));
            }
            {
                NamedPlaceClassification lhsType;
                lhsType = leftObject.getType();
                NamedPlaceClassification rhsType;
                rhsType = rightObject.getType();
                target.setType(((NamedPlaceClassificationstrategy.merge(LocatorUtils.property(leftLocator"type"lhsType), LocatorUtils.property(rightLocator"type"rhsType), lhsTyperhsType)));
            }
        }
    }
New to GrepCode? Check out our FAQ X