The world is an two-dimensional array of cells. The width of the world is acquired by the World class method 'getWidth' and the height is acquired by the World class method 'getHeight'. So the four edges are horizontally at '0' and 'getWidth()-1' and vertically at '0' and 'getHeight()-1'. The World class method 'removeObject' in the world class will make an object 'disappear'. The Actor class method 'getWorld' will return the world the actor is in. The actor class methods 'getX' and 'getY' return the location coordinates of the actor within the world.
Those are the pieces. You put them together testing the conditions and then performing the action if needed.