Welcome to MaxCheaters.com

Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads

  • 0

Help help on import javolution.text.TypeFormat; l2jacis


Go to solution Solved by melron,

Question

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

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 1
  • Solution

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

Share this post


Link to post
Share on other sites
  • 0

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.