// Generated by Haxe 4.3.1
package haxe.ds;

import haxe.root.*;

@SuppressWarnings(value={"rawtypes", "unchecked"})
public class List<T> extends haxe.lang.HxObject
{
	public List(haxe.lang.EmptyObject empty)
	{
	}
	
	
	public List()
	{
		//line 44 "/usr/share/haxe/std/haxe/ds/List.hx"
		haxe.ds.List.__hx_ctor_haxe_ds_List(((haxe.ds.List<T>) (this) ));
		//line 44 "/usr/share/haxe/std/haxe/ds/List.hx"
		java.lang.Object __temp_expr1 = ((java.lang.Object) (null) );
	}
	
	
	protected static <T_c> void __hx_ctor_haxe_ds_List(haxe.ds.List<T_c> __hx_this)
	{
		//line 45 "/usr/share/haxe/std/haxe/ds/List.hx"
		__hx_this.length = 0;
	}
	
	
	public haxe.ds._List.ListNode<T> h;
	
	public haxe.ds._List.ListNode<T> q;
	
	public int length;
	
	public void push(T item)
	{
		//line 69 "/usr/share/haxe/std/haxe/ds/List.hx"
		haxe.ds._List.ListNode<T> x = new haxe.ds._List.ListNode<T>(((T) (item) ), ((haxe.ds._List.ListNode<T>) (this.h) ));
		//line 70 "/usr/share/haxe/std/haxe/ds/List.hx"
		this.h = x;
		//line 71 "/usr/share/haxe/std/haxe/ds/List.hx"
		if (( this.q == null )) 
		{
			//line 72 "/usr/share/haxe/std/haxe/ds/List.hx"
			this.q = x;
		}
		
		//line 73 "/usr/share/haxe/std/haxe/ds/List.hx"
		this.length++;
	}
	
	
	public T pop()
	{
		//line 100 "/usr/share/haxe/std/haxe/ds/List.hx"
		if (( this.h == null )) 
		{
			//line 101 "/usr/share/haxe/std/haxe/ds/List.hx"
			return null;
		}
		
		//line 102 "/usr/share/haxe/std/haxe/ds/List.hx"
		T x = this.h.item;
		//line 103 "/usr/share/haxe/std/haxe/ds/List.hx"
		this.h = this.h.next;
		//line 104 "/usr/share/haxe/std/haxe/ds/List.hx"
		if (( this.h == null )) 
		{
			//line 105 "/usr/share/haxe/std/haxe/ds/List.hx"
			this.q = null;
		}
		
		//line 106 "/usr/share/haxe/std/haxe/ds/List.hx"
		this.length--;
		//line 107 "/usr/share/haxe/std/haxe/ds/List.hx"
		return x;
	}
	
	
	@Override public double __hx_setField_f(java.lang.String field, double value, boolean handleProperties)
	{
		//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
		{
			//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
			boolean __temp_executeDef1 = true;
			//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
			if (( field != null )) 
			{
				//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
				switch (field.hashCode())
				{
					case -1106363674:
					{
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						if (field.equals("length")) 
						{
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							__temp_executeDef1 = false;
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							this.length = ((int) (value) );
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							return value;
						}
						
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						break;
					}
					
					
				}
				
			}
			
			//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
			if (__temp_executeDef1) 
			{
				//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
				return super.__hx_setField_f(field, value, handleProperties);
			}
			else
			{
				//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
				throw null;
			}
			
		}
		
	}
	
	
	@Override public java.lang.Object __hx_setField(java.lang.String field, java.lang.Object value, boolean handleProperties)
	{
		//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
		{
			//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
			boolean __temp_executeDef1 = true;
			//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
			if (( field != null )) 
			{
				//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
				switch (field.hashCode())
				{
					case -1106363674:
					{
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						if (field.equals("length")) 
						{
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							__temp_executeDef1 = false;
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							this.length = ((int) (haxe.lang.Runtime.toInt(value)) );
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							return value;
						}
						
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						break;
					}
					
					
					case 104:
					{
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						if (field.equals("h")) 
						{
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							__temp_executeDef1 = false;
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							this.h = ((haxe.ds._List.ListNode<T>) (value) );
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							return value;
						}
						
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						break;
					}
					
					
					case 113:
					{
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						if (field.equals("q")) 
						{
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							__temp_executeDef1 = false;
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							this.q = ((haxe.ds._List.ListNode<T>) (value) );
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							return value;
						}
						
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						break;
					}
					
					
				}
				
			}
			
			//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
			if (__temp_executeDef1) 
			{
				//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
				return super.__hx_setField(field, value, handleProperties);
			}
			else
			{
				//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
				throw null;
			}
			
		}
		
	}
	
	
	@Override public java.lang.Object __hx_getField(java.lang.String field, boolean throwErrors, boolean isCheck, boolean handleProperties)
	{
		//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
		{
			//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
			boolean __temp_executeDef1 = true;
			//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
			if (( field != null )) 
			{
				//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
				switch (field.hashCode())
				{
					case 111185:
					{
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						if (field.equals("pop")) 
						{
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							__temp_executeDef1 = false;
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							return ((haxe.lang.Function) (new haxe.lang.Closure(this, "pop")) );
						}
						
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						break;
					}
					
					
					case 104:
					{
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						if (field.equals("h")) 
						{
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							__temp_executeDef1 = false;
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							return this.h;
						}
						
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						break;
					}
					
					
					case 3452698:
					{
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						if (field.equals("push")) 
						{
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							__temp_executeDef1 = false;
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							return ((haxe.lang.Function) (new haxe.lang.Closure(this, "push")) );
						}
						
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						break;
					}
					
					
					case 113:
					{
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						if (field.equals("q")) 
						{
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							__temp_executeDef1 = false;
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							return this.q;
						}
						
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						break;
					}
					
					
					case -1106363674:
					{
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						if (field.equals("length")) 
						{
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							__temp_executeDef1 = false;
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							return this.length;
						}
						
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						break;
					}
					
					
				}
				
			}
			
			//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
			if (__temp_executeDef1) 
			{
				//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
				return super.__hx_getField(field, throwErrors, isCheck, handleProperties);
			}
			else
			{
				//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
				throw null;
			}
			
		}
		
	}
	
	
	@Override public double __hx_getField_f(java.lang.String field, boolean throwErrors, boolean handleProperties)
	{
		//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
		{
			//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
			boolean __temp_executeDef1 = true;
			//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
			if (( field != null )) 
			{
				//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
				switch (field.hashCode())
				{
					case -1106363674:
					{
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						if (field.equals("length")) 
						{
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							__temp_executeDef1 = false;
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							return ((double) (this.length) );
						}
						
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						break;
					}
					
					
				}
				
			}
			
			//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
			if (__temp_executeDef1) 
			{
				//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
				return super.__hx_getField_f(field, throwErrors, handleProperties);
			}
			else
			{
				//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
				throw null;
			}
			
		}
		
	}
	
	
	@Override public java.lang.Object __hx_invokeField(java.lang.String field, java.lang.Object[] dynargs)
	{
		//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
		{
			//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
			boolean __temp_executeDef1 = true;
			//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
			if (( field != null )) 
			{
				//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
				switch (field.hashCode())
				{
					case 111185:
					{
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						if (field.equals("pop")) 
						{
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							__temp_executeDef1 = false;
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							return this.pop();
						}
						
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						break;
					}
					
					
					case 3452698:
					{
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						if (field.equals("push")) 
						{
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							__temp_executeDef1 = false;
							//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
							this.push(((T) (dynargs[0]) ));
						}
						
						//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
						break;
					}
					
					
				}
				
			}
			
			//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
			if (__temp_executeDef1) 
			{
				//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
				return super.__hx_invokeField(field, dynargs);
			}
			
		}
		
		//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
		return null;
	}
	
	
	@Override public void __hx_getFields(haxe.root.Array<java.lang.String> baseArr)
	{
		//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
		baseArr.push("length");
		//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
		baseArr.push("q");
		//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
		baseArr.push("h");
		//line 32 "/usr/share/haxe/std/haxe/ds/List.hx"
		super.__hx_getFields(baseArr);
	}
	
	
}


