/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package usda.weru.gis.data;

import java.text.DecimalFormat;
import java.text.NumberFormat;

/**
 *
 * @author Joseph A. Levin <joelevin@weru.ksu.edu>
 */
public class CropManagementZone {

    private final float c_id;
    
    public CropManagementZone(float id){
        c_id = id;
    }
    
    public float getId(){
        return c_id;
    }

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

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 23 * hash + Float.floatToIntBits(this.c_id);
        return hash;
    }

    @Override
    public String toString() {
        NumberFormat format = new DecimalFormat("CMZ 0.#;CMZ 0");
        return format.format(c_id);
    }





}
