Added javadoc

Hopefully that's a good start... 
I actually wonder if this should throw... Any ideas? I'd be tempted to say no