// Generated by Haxe 4.3.3
package haxe.root;

import haxe.root.*;

@SuppressWarnings(value={"rawtypes", "unchecked"})
public class Std
{
	public Std()
	{
	}
	
	
	public static boolean isOfType(java.lang.Object v, java.lang.Object t)
	{
		//line 35 "/usr/share/haxe/std/java/_std/Std.hx"
		if (( v == null )) 
		{
			//line 36 "/usr/share/haxe/std/java/_std/Std.hx"
			return false;
		}
		
		//line 37 "/usr/share/haxe/std/java/_std/Std.hx"
		if (( t == null )) 
		{
			//line 38 "/usr/share/haxe/std/java/_std/Std.hx"
			return false;
		}
		
		//line 39 "/usr/share/haxe/std/java/_std/Std.hx"
		java.lang.Class clt = ((java.lang.Class) (t) );
		//line 40 "/usr/share/haxe/std/java/_std/Std.hx"
		if (( ((java.lang.Object) (clt) ) == ((java.lang.Object) (null) ) )) 
		{
			//line 41 "/usr/share/haxe/std/java/_std/Std.hx"
			return false;
		}
		
		//line 42 "/usr/share/haxe/std/java/_std/Std.hx"
		java.lang.String name = clt.getName();
		//line 44 "/usr/share/haxe/std/java/_std/Std.hx"
		{
			//line 44 "/usr/share/haxe/std/java/_std/Std.hx"
			java.lang.String __temp_svar1 = (name);
			//line 44 "/usr/share/haxe/std/java/_std/Std.hx"
			int __temp_hash3 = __temp_svar1.hashCode();
			//line 44 "/usr/share/haxe/std/java/_std/Std.hx"
			if (( __temp_svar1 != null )) 
			{
				//line 44 "/usr/share/haxe/std/java/_std/Std.hx"
				switch (__temp_hash3)
				{
					case 344809556:
					case 64711720:
					{
						//line 50 "/usr/share/haxe/std/java/_std/Std.hx"
						if (( (( ( __temp_hash3 == 344809556 ) && __temp_svar1.equals("java.lang.Boolean") )) || __temp_svar1.equals("boolean") )) 
						{
							//line 50 "/usr/share/haxe/std/java/_std/Std.hx"
							return v instanceof java.lang.Boolean;
						}
						
						//line 50 "/usr/share/haxe/std/java/_std/Std.hx"
						break;
					}
					
					
					case 1063877011:
					{
						//line 52 "/usr/share/haxe/std/java/_std/Std.hx"
						if (__temp_svar1.equals("java.lang.Object")) 
						{
							//line 52 "/usr/share/haxe/std/java/_std/Std.hx"
							return true;
						}
						
						//line 52 "/usr/share/haxe/std/java/_std/Std.hx"
						break;
					}
					
					
					case 761287205:
					case -1325958191:
					{
						//line 46 "/usr/share/haxe/std/java/_std/Std.hx"
						if (( (( ( __temp_hash3 == 761287205 ) && __temp_svar1.equals("java.lang.Double") )) || __temp_svar1.equals("double") )) 
						{
							//line 46 "/usr/share/haxe/std/java/_std/Std.hx"
							return haxe.lang.Runtime.isDouble(v);
						}
						
						//line 46 "/usr/share/haxe/std/java/_std/Std.hx"
						break;
					}
					
					
					case -2056817302:
					case 104431:
					{
						//line 48 "/usr/share/haxe/std/java/_std/Std.hx"
						if (( (( ( __temp_hash3 == -2056817302 ) && __temp_svar1.equals("java.lang.Integer") )) || __temp_svar1.equals("int") )) 
						{
							//line 48 "/usr/share/haxe/std/java/_std/Std.hx"
							return haxe.lang.Runtime.isInt(v);
						}
						
						//line 48 "/usr/share/haxe/std/java/_std/Std.hx"
						break;
					}
					
					
				}
				
			}
			
		}
		
		//line 55 "/usr/share/haxe/std/java/_std/Std.hx"
		java.lang.Class clv = v.getClass();
		//line 57 "/usr/share/haxe/std/java/_std/Std.hx"
		return clt.isAssignableFrom(((java.lang.Class) (clv) ));
	}
	
	
	public static java.lang.String string(java.lang.Object s)
	{
		//line 61 "/usr/share/haxe/std/java/_std/Std.hx"
		return ( haxe.lang.Runtime.toString(s) + "" );
	}
	
	
	public static int _int(double x)
	{
		//line 65 "/usr/share/haxe/std/java/_std/Std.hx"
		return ((int) (x) );
	}
	
	
	public static java.lang.Object parseInt(java.lang.String x)
	{
		//line 80 "/usr/share/haxe/std/java/_std/Std.hx"
		try 
		{
			//line 81 "/usr/share/haxe/std/java/_std/Std.hx"
			if (( x == null )) 
			{
				//line 82 "/usr/share/haxe/std/java/_std/Std.hx"
				return null;
			}
			
			//line 84 "/usr/share/haxe/std/java/_std/Std.hx"
			int len = x.length();
			//line 85 "/usr/share/haxe/std/java/_std/Std.hx"
			int index = 0;
			//line 91 "/usr/share/haxe/std/java/_std/Std.hx"
			while (( index < len ))
			{
				//line 92 "/usr/share/haxe/std/java/_std/Std.hx"
				int code1 = ((int) (((java.lang.String) (((java.lang.Object) (x) )) ).charAt(index)) );
				//line 92 "/usr/share/haxe/std/java/_std/Std.hx"
				if ( ! ((( ( ( code1 > 8 ) && ( code1 < 14 ) ) || ( code1 == 32 ) ))) ) 
				{
					//line 93 "/usr/share/haxe/std/java/_std/Std.hx"
					break;
				}
				
				//line 94 "/usr/share/haxe/std/java/_std/Std.hx"
				 ++ index;
			}
			
			//line 98 "/usr/share/haxe/std/java/_std/Std.hx"
			boolean isNegative = false;
			//line 98 "/usr/share/haxe/std/java/_std/Std.hx"
			if (( index < len )) 
			{
				//line 99 "/usr/share/haxe/std/java/_std/Std.hx"
				int sign = ((int) (((java.lang.String) (((java.lang.Object) (x) )) ).charAt(index)) );
				//line 100 "/usr/share/haxe/std/java/_std/Std.hx"
				if (( ( sign == 45 ) || ( sign == 43 ) )) 
				{
					//line 101 "/usr/share/haxe/std/java/_std/Std.hx"
					 ++ index;
				}
				
				//line 98 "/usr/share/haxe/std/java/_std/Std.hx"
				isNegative = ( sign == 45 );
			}
			else
			{
				//line 98 "/usr/share/haxe/std/java/_std/Std.hx"
				isNegative = false;
			}
			
			//line 107 "/usr/share/haxe/std/java/_std/Std.hx"
			boolean isHexadecimal = false;
			//line 107 "/usr/share/haxe/std/java/_std/Std.hx"
			if (( ( index + 1 ) < len )) 
			{
				//line 107 "/usr/share/haxe/std/java/_std/Std.hx"
				int cur = ((int) (((java.lang.String) (((java.lang.Object) (x) )) ).charAt(index)) );
				//line 107 "/usr/share/haxe/std/java/_std/Std.hx"
				int next = ((int) (((java.lang.String) (((java.lang.Object) (x) )) ).charAt(( index + 1 ))) );
				//line 107 "/usr/share/haxe/std/java/_std/Std.hx"
				isHexadecimal = ( ( cur == 48 ) && (( ( next == 120 ) || ( next == 88 ) )) );
			}
			else
			{
				//line 107 "/usr/share/haxe/std/java/_std/Std.hx"
				isHexadecimal = false;
			}
			
			//line 108 "/usr/share/haxe/std/java/_std/Std.hx"
			if (isHexadecimal) 
			{
				//line 109 "/usr/share/haxe/std/java/_std/Std.hx"
				index += 2;
			}
			
			//line 113 "/usr/share/haxe/std/java/_std/Std.hx"
			int cur1 = index;
			//line 114 "/usr/share/haxe/std/java/_std/Std.hx"
			if (isHexadecimal) 
			{
				//line 115 "/usr/share/haxe/std/java/_std/Std.hx"
				while (( cur1 < len ))
				{
					//line 116 "/usr/share/haxe/std/java/_std/Std.hx"
					int code2 = ((int) (((java.lang.String) (((java.lang.Object) (x) )) ).charAt(cur1)) );
					//line 116 "/usr/share/haxe/std/java/_std/Std.hx"
					if ( ! ((( ( ( ( 48 <= code2 ) && ( code2 <= 57 ) ) || ( ( 97 <= code2 ) && ( code2 <= 102 ) ) ) || ( ( 65 <= code2 ) && ( code2 <= 70 ) ) ))) ) 
					{
						//line 117 "/usr/share/haxe/std/java/_std/Std.hx"
						break;
					}
					
					//line 118 "/usr/share/haxe/std/java/_std/Std.hx"
					 ++ cur1;
				}
				
			}
			else
			{
				//line 121 "/usr/share/haxe/std/java/_std/Std.hx"
				while (( cur1 < len ))
				{
					//line 122 "/usr/share/haxe/std/java/_std/Std.hx"
					int code3 = ((int) (((java.lang.String) (((java.lang.Object) (x) )) ).charAt(cur1)) );
					//line 122 "/usr/share/haxe/std/java/_std/Std.hx"
					if ( ! ((( ( 48 <= code3 ) && ( code3 <= 57 ) ))) ) 
					{
						//line 123 "/usr/share/haxe/std/java/_std/Std.hx"
						break;
					}
					
					//line 124 "/usr/share/haxe/std/java/_std/Std.hx"
					 ++ cur1;
				}
				
			}
			
			//line 112 "/usr/share/haxe/std/java/_std/Std.hx"
			int firstInvalidIndex = cur1;
			//line 131 "/usr/share/haxe/std/java/_std/Std.hx"
			if (( index == firstInvalidIndex )) 
			{
				//line 132 "/usr/share/haxe/std/java/_std/Std.hx"
				return null;
			}
			
			//line 134 "/usr/share/haxe/std/java/_std/Std.hx"
			int result = java.lang.Integer.parseInt(haxe.lang.Runtime.toString(haxe.lang.StringExt.substring(x, index, firstInvalidIndex)), ((int) (( (isHexadecimal) ? (16) : (10) )) ));
			//line 135 "/usr/share/haxe/std/java/_std/Std.hx"
			if (isNegative) 
			{
				//line 135 "/usr/share/haxe/std/java/_std/Std.hx"
				return  - (result) ;
			}
			else
			{
				//line 135 "/usr/share/haxe/std/java/_std/Std.hx"
				return result;
			}
			
		}
		catch (java.lang.Throwable typedException)
		{
			//line 80 "/usr/share/haxe/std/java/_std/Std.hx"
			throw ((java.lang.RuntimeException) (haxe.Exception.thrown(typedException)) );
		}
		
		
	}
	
	
}


