A lazy alternative would be to make the String comparator work without doing anything extra (defining your own comparator). You can have that by padding with zeros the numbers within your String like this: room0001, room0002, room0100
then the default String comparator will work. You do however, need to know the maximum number value so you can adapt your padding accordingly.