made getPattern() const