Jaba

I understand your hate now Sup Forums

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

just make everything public and not be autistic

But I have to protect the memory from unwanted mutation.

>encapsulation is bad
Wat?

literally how would you do this in another language then

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.

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.

The same you protect people from calling your public accessers

use lombok. no need to thank me.

wtf i hate jaba now

so store it all as strings

Syntactic sugar, obviously. I'm learning Ruby at the moment and it's pretty cool, attr_reader foo, bar generates getters for instance variables foo and bar.

C#

public foo { get; protected set }

public 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;
}
}

That is not safe tho

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

It's not the language's fault that you don't put the open curly brackets on a new line, you fucking neanderthal.

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