Beispiel #1
0
 @Override
 public void validate() throws ValidationException {
   if (iD.equals(Amount.ZERO)) throw new ValidationException(this, "Invalid iD");
   if (oD.equals(Amount.ZERO)) throw new ValidationException(this, "Invalid oD");
   if (getLength().equals(Amount.ZERO)) throw new ValidationException(this, "Invalid Length");
   if (iD.isGreaterThan(oD)) throw new ValidationException(this, "iD > oD");
 }
 @Override
 public boolean equals(Object obj) {
   if (this == obj) {
     return true;
   }
   if (!super.equals(obj)) {
     return false;
   }
   if (!(obj instanceof BillItemVO)) {
     return false;
   }
   BillItemVO<?, ?> other = (BillItemVO<?, ?>) obj;
   if (unitRate == null) {
     if (other.unitRate != null) {
       return false;
     }
   } else if (!unitRate.equals(other.unitRate)) {
     return false;
   }
   return true;
 }
Beispiel #3
0
 public void setFinDiameter(Amount<Length> finDiameter) throws PropertyVetoException {
   if (finDiameter.equals(this.finDiameter)) return;
   this.finDiameter = finDiameter;
   generateGeometry();
 }
Beispiel #4
0
 public void setFinWidth(Amount<Length> finWidth) throws PropertyVetoException {
   if (finWidth.equals(this.finWidth)) return;
   this.finWidth = finWidth;
   generateGeometry();
 }
Beispiel #5
0
 public void setID(Amount<Length> id) throws PropertyVetoException {
   if (id.equals(this.iD)) return;
   iD = id;
   generateGeometry();
 }
Beispiel #6
0
 public void setOD(Amount<Length> od) throws PropertyVetoException {
   if (od.equals(this.oD)) return;
   this.oD = od;
   generateGeometry();
 }