Jump to content

OSBot 2.2.40 - A little bit of everything


Alek

Recommended Posts

Umm....

booleanToText(Boolean) == (Boolean.toString(Boolean) || (Boolean+""))

textToBoolean(String) == Boolean.parseBoolean("true");

 

parseBoolean uses equalsIgnoreCase and I wanted to make matching methods. If it's really that big of a deal I can remove it. Just figured I would make a small private method public.

 

From the API:

cf0ca505220534382dab3ef91dac0594.png

 

It's pretty much identical..

Link to comment

Read my post above yours, I edited it. I know what the default method looks like, that's why I made mine. If it's really that big of a problem I'll just make it private again.

 

I'm not saying that it is a problem, just useless at best. There is no reason for it to public or even be private for that matter, when you can achieve the same by using the default methods, with the added benefit of less lines of code.

 

Not trying to put you down, just being a critic.

Link to comment

I'm not saying that it is a problem, just useless at best. There is no reason for it to public or even be private for that matter, when you can achieve the same by using the default methods, with the added benefit of less lines of code.

 

Not trying to put you down, just being a critic.

 

booleanToText is identical, but it was only to match textToBoolean. I wanted to assess that the string was in fact "true" without manipulation. Therefore putting it to lowercase first or toString() wasn't viable. The only reason why I mentioned it is because all API additions/changes go into the changelog. 

 

For the average person yes, it's really not needed.

 

Edit: I'll update API documentation to make it a little bit less confusing and remove booleanToText on the next update.

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...