I want to know if there is a better way to write the following class
public class Helper
{
public static boolean isMatch(final Collection<ClassA> customList)
public static boolean containsProperty(final Collection<ClassA> customList, final String property)
}
The way the method is called is:
Helper.isMatch(customList);
What I would like to do is make the call as:
customList.isMatch();
Any advice would be great.
If you use Guava, you can use, for instance, ForwardingList.
It forwards all default
Listmethod to the embedded instance, and you can add your own.More details here.