Okay so now i understand it. But if i move the world instead how i´d detect when it reaches its end or when the player collisions something, some pseudocode?Another thing in libGDX there something called OrtographicCamera what is it and how it works?
Usually a camera isn't like an actual camera it doesn't have code that records the world or something, instead it acts more like data, telling you where you are currently "looking" in the 2d/3d world, you can then use that information to offset your drawing based on that fact.
I'm not super familiar with slick but if it gives you some kind of "sprite" class with a position and draws it onscreen then you essentially want to take the camera's position and draw objects relative to it. I.e. if your screen is 100x100 across and there is a sprite at 10, 0(based on a top left origin) then you would take its position and subtract the camera position from it. So if the camera is at 5, 0 then we draw the sprite at 10-5, 0-0. So it ends up at 5, 0 relative to the screen.
You can also let the 3d camera do the work if they give you access to it, if you ask to draw a sprite at 10, 0 then the library may have some kind of "view" class that manipulates the view matrix, that would automatically translate sprites for you based on the position you set the view to(i.e. you set the view to 5, 0 and draw the sprite at 10, 0 then the underlying rendering code will draw it as if it were 5 from the left of the window.)
I mentioned the first method because you'll end up having to use the first method anyway if you're drawing something like tiles. Usually you want to take the camera position and try to figure out what objects are visible to the camera and only ask to draw those, that way the renderer doesn't have to go through the trouble of starting to draw them and then culling them because they are outside the viewport.
As for your question, if the camera is a class or the view is a class you can clamp the position you set the view or camera to so that it won't go outside the bounds of your virtual world.