2015-05-06 15:14:33 -07:00
|
|
|
|
//: patterns/trash/FillableList.java
|
2015-05-29 14:18:51 -07:00
|
|
|
|
// <20>2015 MindView LLC: see Copyright.txt
|
2015-05-06 15:14:33 -07:00
|
|
|
|
// Adapter that makes an ArrayList Fillable.
|
|
|
|
|
package patterns.trash;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
2015-05-27 23:30:19 -07:00
|
|
|
|
public class FillableList<T extends Trash>
|
|
|
|
|
implements Fillable<T> {
|
|
|
|
|
private ArrayList<T> v;
|
|
|
|
|
public FillableList(ArrayList<T> vv) {
|
2015-05-18 23:05:20 -07:00
|
|
|
|
v = vv;
|
|
|
|
|
}
|
2015-05-06 15:14:33 -07:00
|
|
|
|
@Override
|
2015-05-27 23:30:19 -07:00
|
|
|
|
public void addTrash(T t) { v.add(t); }
|
2015-05-06 15:14:33 -07:00
|
|
|
|
} ///:~
|