Jump to content
  • 0

help on import javolution.text.TypeFormat; l2jacis


Question

Posted

i noticed on l2jacis is not being used javolution also fastmap changed to hashmap , what about the typeformat ?

 

import javolution.text.TypeFormat;   <--

BLESS_WEAPON_ENCHANT_LEVEL.put(TypeFormat.parseInt(writeData[0]), TypeFormat.parseInt(writeData[1]));

wich iis the new '' typeformat import' and what i'll change for this option i wish to use ! thank you

4 answers to this question

Recommended Posts

  • 1
Posted

Im not sure about what TypeFormat does, but i think stands there to catch NumberFormatException ...

in example:

 

public static void main(String[] args)
{
	String one = "1f";

	System.out.println("TypeFormat : " + TypeFormat.parseInt(one));

	System.out.println("Integer : " + Integer.parseInt(one));
}

static class TypeFormat
{
	public static int parseInt(String val)
	{
		try
		{
			return Integer.parseInt(val);
		} catch (NumberFormatException e)
		{
			return 0;
		}
	}
}

 

Capture.PNG.e6baaebe247400b130324665c7f5c170.PNG

  • 0
Posted

When you don't know something, or you cannot understand it. Simply, use google and find its documentation.

 

In less than 3s of search: http://javolution.org/apidocs/javolution/text/TypeFormat.html

 

Anyway... @melron explained it good. Simple and good.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock