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

nl.cloudfarming.client.geoviewer.edit.GeoNode Maven / Gradle / Ivy

/**
 * Copyright (C) 2011 Agrosense 
 *
 * Licensed under the Eclipse Public License - v 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.eclipse.org/legal/epl-v10.html
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package nl.cloudfarming.client.geoviewer.edit;

import com.vividsolutions.jts.geom.Coordinate;

/**
 *
 * @author Timon Veenstra
 */
public class GeoNode {
    private Coordinate coordinate;

    public GeoNode(Coordinate coordinate) {
        this.coordinate = coordinate;
    }

    public Coordinate getCoordinate() {
        return coordinate;
    }

    public void setCoordinate(Coordinate coordinate) {
        this.coordinate = coordinate;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final GeoNode other = (GeoNode) obj;
        if (this.coordinate != other.coordinate && (this.coordinate == null || !this.coordinate.equals(other.coordinate))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 29 * hash + (this.coordinate != null ? this.coordinate.hashCode() : 0);
        return hash;
    }

    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy