Code example for BigDecimal

Methods: divide

0
    public BigDecimal getTime() {
        return new BigDecimal(nbSecunds);
    } 
 
    public BigDecimal getTimeInMinutes() {
        return (new BigDecimal(nbSecunds)).divide(new BigDecimal(60));
    } 
 
 
    @Override 
    public boolean equals(Object obj) {
        return !(obj == null || this.getClass() != obj.getClass())
               && (nbSecunds == ((DurationBean)obj).nbSecunds);
    } 
 
 
    @Override 
    public int hashCode() { 
        return (int)nbSecunds;
    } 
}