I would like to write in Java localization system for a robot. However I am stuck at the very beginning. I don't know how to represent the map. The map is not complicated and will never be bigger than few meters by few meters. It doesn't change when robot is moving.
The readings that I will have from sensors are angle (provided by compass) and pairs of integers (angle and distance).
Probabilistic Robotics by Thrun, Burgard and Fox covers a number of different techniques for modelling maps suitable for robotics applications. These include:
The suitability of each approach depends on how sparse / cluttered the environment is and what types of sensors are available for updating the map.