Commits

David Lin  committed d1c32c6

Bad Design due to Decorator

  • Participants
  • Parent commits ffbb096

Comments (0)

Files changed (3)

File src/Edge/AbstractEdgeDecorator.java

   @Override
   public final boolean accept(Package visitor)
   {
+    // strange!!!
     if(!getFrom().accept(visitor) || !getTo().accept(visitor))
       return false;
     else if(getLoadWeight() < visitor.getWeight())

File src/Location/AbstractLocation.java

     this.name = name;
   }
   
+  //
+  @Override
+  public final boolean accept(Package visitor)
+  {
+    return visitor.visit(this);
+  }
+  
 }

File src/Location/City.java

   }
   
   //
-  @Override
-  public boolean accept(Package visitor)
-  {
-    return visitor.visit(this);
-  }
+  
   
 }