All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.micromata.opengis.kml.v_2_2_0.gx.SimpleArrayField Maven / Gradle / Ivy

Go to download

This is JavaAPIforKMml, Micromata's library for use with applications that want to parse, generate and operate on KML. It is an implementation of the OGC KML 2.2 standard. It is written entirely in Java and makes heavy use of JAXB.

There is a newer version: 3.0.4
Show newest version

package de.micromata.opengis.kml.v_2_2_0.gx;

import jakarta.xml.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;


/**
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SimpleArrayFieldType", propOrder = {
    "displayName",
    "simpleArrayFieldExtension"
})
@XmlRootElement(name = "SimpleArrayField", namespace = "http://www.google.com/kml/ext/2.2")
public class SimpleArrayField implements Cloneable
{

    @XmlElement(namespace = "http://www.opengis.net/kml/2.2")
    protected String displayName;
    @XmlElement(name = "SimpleArrayFieldExtension")
    protected List simpleArrayFieldExtension;
    @XmlAttribute(name = "type")
    protected String type;
    @XmlAttribute(name = "name")
    protected String name;

    public SimpleArrayField() {
        super();
    }

    /**
     * 
     * @return
     *     possible object is
     *     {@link String}
     *     
     */
    public String getDisplayName() {
        return displayName;
    }

    /**
     * 
     * @param value
     *     allowed object is
     *     {@link String}
     *     
     */
    public void setDisplayName(String value) {
        this.displayName = value;
    }

    /**
     * 
     */
    public List getSimpleArrayFieldExtension() {
        if (simpleArrayFieldExtension == null) {
            simpleArrayFieldExtension = new ArrayList();
        }
        return this.simpleArrayFieldExtension;
    }

    /**
     * 
     * @return
     *     possible object is
     *     {@link String}
     *     
     */
    public String getType() {
        return type;
    }

    /**
     * 
     * @param value
     *     allowed object is
     *     {@link String}
     *     
     */
    public void setType(String value) {
        this.type = value;
    }

    /**
     * 
     * @return
     *     possible object is
     *     {@link String}
     *     
     */
    public String getName() {
        return name;
    }

    /**
     * 
     * @param value
     *     allowed object is
     *     {@link String}
     *     
     */
    public void setName(String value) {
        this.name = value;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = ((prime*result)+((displayName == null)? 0 :displayName.hashCode()));
        result = ((prime*result)+((simpleArrayFieldExtension == null)? 0 :simpleArrayFieldExtension.hashCode()));
        result = ((prime*result)+((type == null)? 0 :type.hashCode()));
        result = ((prime*result)+((name == null)? 0 :name.hashCode()));
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if ((obj instanceof SimpleArrayField) == false) {
            return false;
        }
        SimpleArrayField other = ((SimpleArrayField) obj);
        if (displayName == null) {
            if (other.displayName!= null) {
                return false;
            }
        } else {
            if (displayName.equals(other.displayName) == false) {
                return false;
            }
        }
        if (simpleArrayFieldExtension == null) {
            if (other.simpleArrayFieldExtension!= null) {
                return false;
            }
        } else {
            if (simpleArrayFieldExtension.equals(other.simpleArrayFieldExtension) == false) {
                return false;
            }
        }
        if (type == null) {
            if (other.type!= null) {
                return false;
            }
        } else {
            if (type.equals(other.type) == false) {
                return false;
            }
        }
        if (name == null) {
            if (other.name!= null) {
                return false;
            }
        } else {
            if (name.equals(other.name) == false) {
                return false;
            }
        }
        return true;
    }

    /**
     * Sets the value of the simpleArrayFieldExtension property Objects of the following type(s) are allowed in the list {@code List}.
     * 

Note: *

This method does not make use of the fluent pattern.If you would like to make it fluent, use {@link #withSimpleArrayFieldExtension} instead. * * * @param simpleArrayFieldExtension * Objects of the following type are allowed in the list: {@link Object} */ public void setSimpleArrayFieldExtension(final List simpleArrayFieldExtension) { this.simpleArrayFieldExtension = simpleArrayFieldExtension; } /** * add a value to the simpleArrayFieldExtension property collection * * @param simpleArrayFieldExtension * Objects of the following type are allowed in the list: {@link Object} * @return * true (as general contract of Collection.add). */ public SimpleArrayField addToSimpleArrayFieldExtension(final Object simpleArrayFieldExtension) { this.getSimpleArrayFieldExtension().add(simpleArrayFieldExtension); return this; } /** * fluent setter * * * @param displayName * required parameter */ public SimpleArrayField withDisplayName(final String displayName) { this.setDisplayName(displayName); return this; } /** * fluent setter * * * @param simpleArrayFieldExtension * required parameter */ public SimpleArrayField withSimpleArrayFieldExtension(final List simpleArrayFieldExtension) { this.setSimpleArrayFieldExtension(simpleArrayFieldExtension); return this; } /** * fluent setter * * * @param type * required parameter */ public SimpleArrayField withType(final String type) { this.setType(type); return this; } /** * fluent setter * * * @param name * required parameter */ public SimpleArrayField withName(final String name) { this.setName(name); return this; } @Override public SimpleArrayField clone() { SimpleArrayField copy; try { copy = ((SimpleArrayField) super.clone()); } catch (CloneNotSupportedException _x) { throw new InternalError((_x.toString())); } copy.simpleArrayFieldExtension = new ArrayList((getSimpleArrayFieldExtension().size())); for (Object iter: simpleArrayFieldExtension) { copy.simpleArrayFieldExtension.add(iter); } return copy; } }