Having the get set model:
public class exampleclass
{
private Something something;
public Something getSomething()
{
return something;
}
public void setSomething(Something st)
{
something = st;
}
}
I wanna make something like this:
public class exampleclass
{
public Something something;
public void setSomething(Something st)
{
something = st;
}
}
But i want to have "something" var with readOnly feature out of the class (but rewritable in the own class). Any idea of how to do this for an optimized access. (Think this is gonna be used in android , but using a pure java only framework (libgdx) )