1 16 package net.sf.dozer.util.mapping.vo; 17 18 import java.io.Serializable ; 19 20 26 public class DoubleObject implements Serializable { 27 private double value; 28 29 public DoubleObject() { 30 } 31 32 public DoubleObject(double value) { 33 this.value = value; 34 } 35 36 public double getValue() { 37 return value; 38 } 39 40 public void setValue(double value) { 41 this.value = value; 42 } 43 44 public boolean equals(Object o) { 45 if (this == o) 46 return true; 47 if (!(o instanceof DoubleObject)) 48 return false; 49 50 final DoubleObject doubleObject = (DoubleObject) o; 51 52 if (value != doubleObject.value) 53 return false; 54 55 return true; 56 } 57 58 public int hashCode() { 59 final long temp = value != +0.0d ? Double.doubleToLongBits(value) : 0l; 60 return (int) (temp ^ (temp >>> 32)); 61 } 62 63 public String toString() { 64 return String.valueOf(value); 65 } 66 67 } | Popular Tags |