Questions tagged as 'getters'

3
answers

Doubt about the responsibility of a get ()

Is it acceptable to have a getter method that gets a parameter to be able to have a return variance? Example: getAllNome("M"); <- retorna tudo que for masculino. getAllNome("F"); <- retorna tudo que for feminino. getAllNome(); <- re...
asked by 28.03.2014 / 21:12
1
answer

Encapsulation and Java Access Modifiers

A very simple question: Given this class: public class User { private String nome; //get/set public boolean fazQualquerCoisa(){ **duvida**.equals("algumacoisa"); } } Within the method Does AnyCase () , should I access the n...
asked by 05.05.2015 / 16:36
2
answers

Eclipse creating getter with prefix is

I created the methods using the Eclipse Getters and Setters command, but when I created the getter of the status Boolean attribute, it was automatically created as isStatus . Should not be created as getStatus ? Could anyon...
asked by 27.09.2017 / 03:54