Is there a built-in Java type that guarantees an execute(T t) method?

stanislav

New Member
It seems the need for a type like the following would be so ubiquitous that something like it should be already built into Java:\[code\]public interface Executer<T> { void execute(T object);}\[/code\]It can then be used in other classes like this trivial example that calls a bunch of executers on an object.\[code\]class Handler<T> implements Executer<T> { List<Executer<T>> executerList; Handler(List<Executer<T>> executer) { this.executerList = executer; } void execute(T t) { for (Executer<T> executer : this.executerList) { executer.execute(t); } }}\[/code\]Is there a built-in type equivalent or a common library equivalent? Is there a name for this concept?
 
Top