Wednesday, June 07, 2006

from: Enumerations

Processor onlyString = new Processor() {
public Object process(Object obj,
Collection alwaysNull) {
if (obj instanceof String) {
return obj;
} else {
return null;
}
}
};
Enumeration strings = Enumerations.filter
(elems, onlyString);

0 Comments:

Post a Comment

<< Home