Is it possible to pass the reference of my class attributes by reference? For example:
public class Myclass{
private Boolean FRinCreation=false,
NFRinCreation=false,
DSinCreation=false,
FRinEdit=false,
NFRinEdit=false,
DSinEdit=false;
List<Boolean> getTabBools(ETargetReq req){
switch (req){
case ETR_FUNCTIONAL:
return Arrays.asList(FRinCreation, FRinEdit);
case ETR_NONFUNCTIONAL:
return Arrays.asList(NFRinCreation, NFRinEdit);
case ETR_DATASET:
return Arrays.asList(DSinCreation, DSinEdit);
case ETR_UNKNOWN:
return null;
default:
return null;
}
}
boolean otherFunction(){
//Change the FRinCreation to true
getTabBools(ETR_FUNCTIONAL).set(0, true);
}
unfortunately this does not sot my class attribute value to true if i execute it. Can you guys help me out? I am a bit confused by javas pass by value.