You could have created a subclass of ArrayAdapter that, when given an array of Route objects, could handle this transformation.