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

de.micromata.opengis.kml.v_2_2_0.gx.TourControl 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 java.util.List;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlType;
import de.micromata.opengis.kml.v_2_2_0.annotations.Obvious;


/**
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TourControlType", propOrder = {
    "playMode"
})
@XmlRootElement(name = "TourControl", namespace = "http://www.google.com/kml/ext/2.2")
public class TourControl
    extends TourPrimitive
    implements Cloneable
{

    @XmlElement(defaultValue = "pause")
    protected PlayMode playMode;

    public TourControl() {
        super();
    }

    /**
     * 
     * @return
     *     possible object is
     *     {@link PlayMode}
     *     
     */
    public PlayMode getPlayMode() {
        return playMode;
    }

    /**
     * 
     * @param value
     *     allowed object is
     *     {@link PlayMode}
     *     
     */
    public void setPlayMode(PlayMode value) {
        this.playMode = value;
    }

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

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if ((obj instanceof TourControl) == false) {
            return false;
        }
        TourControl other = ((TourControl) obj);
        if (playMode == null) {
            if (other.playMode!= null) {
                return false;
            }
        } else {
            if (playMode.equals(other.playMode) == false) {
                return false;
            }
        }
        return true;
    }

    /**
     * fluent setter
     *
     * 
     * @param playMode
     *     required parameter
     */
    public TourControl withPlayMode(final PlayMode playMode) {
        this.setPlayMode(playMode);
        return this;
    }

    @Obvious
    @Override
    public TourControl withObjectSimpleExtension(final List objectSimpleExtension) {
        super.withObjectSimpleExtension(objectSimpleExtension);
        return this;
    }

    @Obvious
    @Override
    public TourControl withId(final String id) {
        super.withId(id);
        return this;
    }

    @Obvious
    @Override
    public TourControl withTargetId(final String targetId) {
        super.withTargetId(targetId);
        return this;
    }

    @Override
    public TourControl clone() {
        TourControl copy;
        copy = ((TourControl) super.clone());
        return copy;
    }

}