static abstract class Collector { abstract bool add(A a); // return true if full after this bool full() { ret false; } bool contains(A a) { ret false; } }