Uses equals instead of == to compare method names.