No need for full outside class for this, just nest this or use an anonymouse inner class.