I understand your hate now /g/
idgi are these supposed to be filled in
this is literally the same thing you would do in c++ in this situation, except for a few keyword changes
>>57304733
just make everything public and not be autistic
>>57304786
But I have to protect the memory from unwanted mutation.
>>57304733
>encapsulation is bad
Wat?
>>57304733
literally how would you do this in another language then
>>57304779
Or use a language with immutable data and record types and just do Unit.Item, you fucking clod.
God damnit OO languages are so fucking stupid.
>>57304815
Some languages generate this bullshit automatically but most discount the idea altogether because preemptively writing useless boilerplate like this is overgeneralizing for the sake of preserving the lifetime of sloppy design without foresight.
>>57304805
The same you protect people from calling your public accessers
>>57304733
use lombok. no need to thank me.
>>57304733
wtf i hate jaba now
>>57304805
so store it all as strings
>>57304815
Syntactic sugar, obviously. I'm learning Ruby at the moment and it's pretty cool,attr_reader foo, bargenerates getters for instance variables foo and bar.
>>57304815
C#public foo { get; protected set }
>>57304815public int BaseStats
{
get
{
return baseStats;
}
set
{
baseStats = value;
}
}
public char Type
{
get
{
return type;
}
set
{
type = value;
}
}
public Ability[] AB
{
get
{
return ab;
}
set
{
ab = value;
}
}
public Item Item
{
get
{
return item;
}
set
{
item = value;
}
}
public int Owner
{
get
{
return owner;
}
set
{
owner = value;
}
}
public InteractSprite Sprite
{
get
{
return spt;
}
set
{
spt = value;
}
}
public string Name
{
get
{
return name;
}
set
{
name = value;
}
}
public int UnitID
{
get
{
return UnitID;
}
set
{
UnitID = value;
}
}
>>57304833
That is not safe tho
>>57304733
Lombok.
>not making your arguments final
also just let an IDE generate them. Java is obviously meant to be used with an IDE because otherwise you'd probably just kill yourself
>>57304733
It's not the language's fault that you don't put the open curly brackets on a new line, you fucking neanderthal.
>>57306727
lmao you do realize there is an official Java code convention that puts opening curly braces where op put them? He's just missing a space