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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...