OnJava8-Examples/patterns/trash/FillableArrayList.java

15 lines
335 B
Java
Raw Normal View History

2015-05-05 11:20:13 -07:00
//: patterns/trash/FillableArrayList.java
// Adapter that makes an ArrayList Fillable.
package patterns.trash;
import java.util.*;
public class FillableArrayList
implements Fillable {
private ArrayList v;
public FillableArrayList(ArrayList vv) { v = vv; }
@Override
public void addTrash(Trash t) {
v.add(t);
}
} ///:~