if this is the implementation it looks like def setPattern can be omitted in the subclass.