T
Tom Anderson
Hi chaps,
I just wrote this interface:
public interface Filter<T> {
boolean accept(T obj);
}
That seems awfully basic and generic. Could i be using something that's
already in the JDK? Or something more like a
Callable-that-takes-a-parameter?
I know there's FileFilter and FilenameFilter, but those are too specific,
because of the File argument.
I know there's a Predicate in one of the collections add-on libraries
(Apache or Google, i forget which), which suggests that there isn't
something like this in the base library, but i thought i'd ask.
Thanks,
tom
I just wrote this interface:
public interface Filter<T> {
boolean accept(T obj);
}
That seems awfully basic and generic. Could i be using something that's
already in the JDK? Or something more like a
Callable-that-takes-a-parameter?
I know there's FileFilter and FilenameFilter, but those are too specific,
because of the File argument.
I know there's a Predicate in one of the collections add-on libraries
(Apache or Google, i forget which), which suggests that there isn't
something like this in the base library, but i thought i'd ask.
Thanks,
tom