I have seen a fair amount of code like in the (modified) OP in DB retrievals. The query returns a list, but the business rules say there can be only one element. And then, of course, something changed for 'just this one case' to a list with more than one item. (Yeah, I said a fair amount of times. It's almost like they ... nm) So rather than then create a constant, I would (in clean code method) create a method to give a name or make clear what the conditional is intended to detect (and encapsulate how it detects it): public int getMoneyByPersons(){ if(isSingleDepartmentHead()){ // TODO - return money for one person } else { // TODO - calculate and return money for people. } } public boolean isSingleDepartmentHead() { return persons.size() == 1; }