OnJava8-Examples/patterns/trash/FillableList.java
2015-05-06 15:14:33 -07:00

13 lines
312 B
Java

//: patterns/trash/FillableList.java
// Adapter that makes an ArrayList Fillable.
package patterns.trash;
import java.util.*;
public class FillableList
implements Fillable {
private ArrayList v;
public FillableList(ArrayList vv) { v = vv; }
@Override
public void addTrash(Trash t) { v.add(t); }
} ///:~