15 lines
335 B
Java
15 lines
335 B
Java
//: 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);
|
|
}
|
|
} ///:~
|