Implement clear() method