Swizzbeat Posted February 24, 2015 Share Posted February 24, 2015 Because I decided that's where that inheritance branch should end There's no need for it to been extendable. Making a class final really just makes it unextendable ^^ And there's no need for it not to be? I could think of plenty of methods/properties to add, making a class final should only be done when it's absolutely critical that nothing be overriden/extended for the functionality of the class to stay intact (which isn't the case here). Quote Link to comment Share on other sites More sharing options...
Botre Posted February 24, 2015 Author Share Posted February 24, 2015 And there's no need for it not to be? I could think of plenty of methods/properties to add, making a class final should only be done when it's absolutely critical that nothing be overriden/extended for the functionality of the class to stay intact (which isn't the case here). What kind of methods/properties would justify an extended class instead of just adding them to this one? I make my classes immutable and final by default, only making them mutable / extendable when it's absolutely necessary. Quote Link to comment Share on other sites More sharing options...
VladBots Posted February 24, 2015 Share Posted February 24, 2015 (edited) And there's no need for it not to be? I could think of plenty of methods/properties to add, making a class final should only be done when it's absolutely critical that nothing be overriden/extended for the functionality of the class to stay intact (which isn't the case here). he didn't make all the methods final so we can still override only the table generation cant be overriden because it's private RSExperienceTable table = new RSExperienceTable() { public int getXp(int level) { return 1337; } } Edited February 24, 2015 by VladBots Quote Link to comment Share on other sites More sharing options...
Developer Zach Posted February 26, 2015 Developer Share Posted February 26, 2015 Might be better 'cpu-wise' to use a static table. Since CPU is more precious then the few bytes the table would use. I wouldn't worry about that CPU usage when it's calculated once and stored. It's not even that many calculations in the grand scheme of things anyways. 1 Quote Link to comment Share on other sites More sharing options...
Botre Posted March 6, 2015 Author Share Posted March 6, 2015 Updated Quote Link to comment Share on other sites More sharing options...
VladBots Posted March 6, 2015 Share Posted March 6, 2015 (edited) static final and not final static please, it's the prefered order Edited March 6, 2015 by VladBots Quote Link to comment Share on other sites More sharing options...
Botre Posted March 6, 2015 Author Share Posted March 6, 2015 static final and not final static please, it's the prefered order Fixed lel, that looked gross. 1 Quote Link to comment Share on other sites More sharing options...
Botre Posted March 26, 2015 Author Share Posted March 26, 2015 UPDATED Quote Link to comment Share on other sites More sharing options...