Esempio n. 1
0
 @Override
 public Command mergeTo(Command c) {
   OldMoveLinePoint tmp = (OldMoveLinePoint) c;
   OldMoveLinePoint ret =
       new OldMoveLinePoint(
           getRelation(),
           getLinePointId(),
           getDiffX() + tmp.getDiffX(),
           getDiffY() + tmp.getDiffY());
   return ret;
 }
Esempio n. 2
0
 @Override
 public boolean isMergeableTo(Command c) {
   if (!(c instanceof OldMoveLinePoint)) {
     return false;
   }
   OldMoveLinePoint mlp = (OldMoveLinePoint) c;
   if (getRelation() != mlp.getRelation()) {
     return false;
   }
   if (getLinePointId() != mlp.getLinePointId()) {
     return false;
   }
   return true;
 }