Add getter and setter for Java