OnJava8-Examples/patterns/trash/FillableList.java

15 lines
332 B
Java
Raw Normal View History

2015-05-06 15:14:33 -07:00
//: patterns/trash/FillableList.java
// Adapter that makes an ArrayList Fillable.
package patterns.trash;
import java.util.*;
public class FillableList
implements Fillable {
2015-05-18 23:05:20 -07:00
private ArrayList<Trash> v;
public FillableList(ArrayList<Trash> vv) {
v = vv;
}
2015-05-06 15:14:33 -07:00
@Override
public void addTrash(Trash t) { v.add(t); }
} ///:~