added javadocs

added documentation to stack class