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

de.micromata.opengis.kml.v_2_2_0.gx.SimpleArrayData 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 de.micromata.opengis.kml.v_2_2_0.AbstractObject;
import de.micromata.opengis.kml.v_2_2_0.annotations.Obvious;
import jakarta.xml.bind.annotation.*;

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


/**
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SimpleArrayDataType", propOrder = {
    "value",
    "simpleArrayDataExtension"
})
@XmlRootElement(name = "SimpleArrayData", namespace = "http://www.google.com/kml/ext/2.2")
public class SimpleArrayData
    extends AbstractObject
    implements Cloneable
{

    protected List value;
    @XmlElement(name = "SimpleArrayDataExtension")
    protected List simpleArrayDataExtension;
    @XmlAttribute(name = "name")
    protected String name;

    public SimpleArrayData() {
        super();
    }

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

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

    /**
     * 
     * @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 = super.hashCode();
        result = ((prime*result)+((value == null)? 0 :value.hashCode()));
        result = ((prime*result)+((simpleArrayDataExtension == null)? 0 :simpleArrayDataExtension.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 (super.equals(obj) == false) {
            return false;
        }
        if ((obj instanceof SimpleArrayData) == false) {
            return false;
        }
        SimpleArrayData other = ((SimpleArrayData) obj);
        if (value == null) {
            if (other.value!= null) {
                return false;
            }
        } else {
            if (value.equals(other.value) == false) {
                return false;
            }
        }
        if (simpleArrayDataExtension == null) {
            if (other.simpleArrayDataExtension!= null) {
                return false;
            }
        } else {
            if (simpleArrayDataExtension.equals(other.simpleArrayDataExtension) == 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 value 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 #withValue} instead. * * * @param value * Objects of the following type are allowed in the list: {@link String} */ public void setValue(final List value) { this.value = value; } /** * add a value to the value property collection * * @param value * Objects of the following type are allowed in the list: {@link String} * @return * true (as general contract of Collection.add). */ public SimpleArrayData addToValue(final String value) { this.getValue().add(value); return this; } /** * Sets the value of the simpleArrayDataExtension 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 #withSimpleArrayDataExtension} instead. * * * @param simpleArrayDataExtension * Objects of the following type are allowed in the list: {@link Object} */ public void setSimpleArrayDataExtension(final List simpleArrayDataExtension) { this.simpleArrayDataExtension = simpleArrayDataExtension; } /** * add a value to the simpleArrayDataExtension property collection * * @param simpleArrayDataExtension * Objects of the following type are allowed in the list: {@link Object} * @return * true (as general contract of Collection.add). */ public SimpleArrayData addToSimpleArrayDataExtension(final Object simpleArrayDataExtension) { this.getSimpleArrayDataExtension().add(simpleArrayDataExtension); return this; } @Obvious @Override public void setObjectSimpleExtension(final List objectSimpleExtension) { super.setObjectSimpleExtension(objectSimpleExtension); } @Obvious @Override public SimpleArrayData addToObjectSimpleExtension(final Object objectSimpleExtension) { super.getObjectSimpleExtension().add(objectSimpleExtension); return this; } /** * fluent setter * * * @param value * required parameter */ public SimpleArrayData withValue(final List value) { this.setValue(value); return this; } /** * fluent setter * * * @param simpleArrayDataExtension * required parameter */ public SimpleArrayData withSimpleArrayDataExtension(final List simpleArrayDataExtension) { this.setSimpleArrayDataExtension(simpleArrayDataExtension); return this; } /** * fluent setter * * * @param name * required parameter */ public SimpleArrayData withName(final String name) { this.setName(name); return this; } @Obvious @Override public SimpleArrayData withObjectSimpleExtension(final List objectSimpleExtension) { super.withObjectSimpleExtension(objectSimpleExtension); return this; } @Obvious @Override public SimpleArrayData withId(final String id) { super.withId(id); return this; } @Obvious @Override public SimpleArrayData withTargetId(final String targetId) { super.withTargetId(targetId); return this; } @Override public SimpleArrayData clone() { SimpleArrayData copy; copy = ((SimpleArrayData) super.clone()); copy.value = new ArrayList((getValue().size())); for (String iter: value) { copy.value.add(iter); } copy.simpleArrayDataExtension = new ArrayList((getSimpleArrayDataExtension().size())); for (Object iter: simpleArrayDataExtension) { copy.simpleArrayDataExtension.add(iter); } return copy; } }