Changed documentation to use getter notation

Updated some java documentation to reflect the use of getters instead of calling methods based on field names.

Relates to #2657