Bruce Eckel 49edcc8b17 reorg
2015-06-15 17:47:35 -07:00

20 lines
479 B
Java

//: patterns/doubledispatch/DDCardboard.java
// ©2015 MindView LLC: see Copyright.txt
// Cardboard for double dispatching.
package patterns.doubledispatch;
import patterns.trash.*;
public class DDCardboard extends Cardboard
implements TypedBinMember {
public DDCardboard(double wt) { super(wt); }
@Override
public boolean addToBin(TypedBin[] tb) {
for(TypedBin tb1 : tb) {
if(tb1.add(this)) {
return true;
}
}
return false;
}
} ///:~