Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ExperienceTable Class / snippet

Featured Replies

Because I decided that's where that inheritance branch should end ph34r.png

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).

  • Author

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.

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 ph34r.png

only the table generation cant be overriden because it's private

 

RSExperienceTable table = new RSExperienceTable() {

 

public int getXp(int level) {

        return 1337;

    }

 

}

Edited by VladBots

  • Administrator

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.

  • 2 weeks later...

static final and not final static please, it's the prefered order

Edited by VladBots

  • 3 weeks later...

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.