public static int CompareTo(javaFloat self, float value) { float m_value = self.floatValue(); if (m_value < value) { return(-1); } if (m_value > value) { return(1); } if (m_value == value) { return(0); } // At least one of the values is NaN. if (javaFloat.isNaN(m_value)) { return(javaFloat.isNaN(value) ? 0 : -1); } else // f is NaN. { return(1); } }
public static global::System.Object get(global::java.lang.Object n1, int n2){ //XMLVM_BEGIN_WRAPPER[java.lang.reflect.Array: java.lang.Object get(java.lang.Object, int)] throw new org.xmlvm._nNotYetImplementedException("native/wrapper method not yet implemented"); if (n1==null) { java.lang.NullPointerException jex = new java.lang.NullPointerException(); jex.@this(); throw new org.xmlvm._nExceptionAdapter(jex); } else if (n1 is org.xmlvm._nArrayAdapter<object>) { return ((org.xmlvm._nArrayAdapter<object>) n1)[n2]; } else if (n1 is org.xmlvm._nArrayAdapter<bool>) { bool unwrappedBoolean = ((org.xmlvm._nArrayAdapter<bool>) n1)[n2]; java.lang.Boolean result = new java.lang.Boolean(); result.@this(unwrappedBoolean); return result; } else if (n1 is org.xmlvm._nArrayAdapter<sbyte>) { sbyte unwrappedByte = ((org.xmlvm._nArrayAdapter<sbyte>) n1)[n2]; java.lang.Byte result = new java.lang.Byte(); result.@this(unwrappedByte); return result; } else if (n1 is org.xmlvm._nArrayAdapter<char>) { char unwrappedChar = ((org.xmlvm._nArrayAdapter<char>) n1)[n2]; java.lang.Character result = new java.lang.Character(); result.@this(unwrappedChar); return result; } else if (n1 is org.xmlvm._nArrayAdapter<short>) { short unwrappedShort = ((org.xmlvm._nArrayAdapter<short>) n1)[n2]; java.lang.Short result = new java.lang.Short(); result.@this(unwrappedShort); return result; } else if (n1 is org.xmlvm._nArrayAdapter<int>) { int unwrappedInteger = ((org.xmlvm._nArrayAdapter<int>) n1)[n2]; java.lang.Integer result = new java.lang.Integer(); result.@this(unwrappedInteger); return result; } else if (n1 is org.xmlvm._nArrayAdapter<long>) { long unwrappedLong = ((org.xmlvm._nArrayAdapter<long>) n1)[n2]; java.lang.Long result = new java.lang.Long(); result.@this(unwrappedLong); return result; } else if (n1 is org.xmlvm._nArrayAdapter<float>) { float unwrappedFloat = ((org.xmlvm._nArrayAdapter<float>) n1)[n2]; java.lang.Float result = new java.lang.Float(); result.@this(unwrappedFloat); return result; } else if (n1 is org.xmlvm._nArrayAdapter<double>) { double unwrappedDouble = ((org.xmlvm._nArrayAdapter<double>) n1)[n2]; java.lang.Double result = new java.lang.Double(); result.@this(unwrappedDouble); return result; } else if (!(n1 is org.xmlvm._nIArray)) { // it is not an org.xmlvm._nIArray java.lang.IllegalArgumentException jex = new java.lang.IllegalArgumentException(); jex.@this(org.xmlvm._nUtil.toJavaString("Not an array")); throw new org.xmlvm._nExceptionAdapter(jex); } else { // something went wrong throw new org.xmlvm._nNativeImplementationException(); } //XMLVM_END_WRAPPER[java.lang.reflect.Array: java.lang.Object get(java.lang.Object, int)] }
public void put(java.lang.String arg0, java.lang.Float arg1) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; if (!IsClrObject) { @__env.CallVoidMethod(this.JvmHandle, global::android.content.ContentValues._put1259, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1)); } else { @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.content.ContentValues.staticClass, global::android.content.ContentValues._put1259, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1)); } }
public int compareTo(java.lang.Float arg0) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; if (!IsClrObject) { return(@__env.CallIntMethod(this.JvmHandle, global::java.lang.Float._compareTo12965, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0))); } else { return(@__env.CallNonVirtualIntMethod(this.JvmHandle, global::java.lang.Float.staticClass, global::java.lang.Float._compareTo12965, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0))); } }
internal static object Unbox(object val) { #if STATIC_COMPILER || FIRST_PASS || STUB_GENERATOR return(null); #else java.lang.Byte b = val as java.lang.Byte; if (b != null) { return(b.byteValue()); } java.lang.Boolean b1 = val as java.lang.Boolean; if (b1 != null) { return(b1.booleanValue()); } java.lang.Short s = val as java.lang.Short; if (s != null) { return(s.shortValue()); } java.lang.Character c = val as java.lang.Character; if (c != null) { return(c.charValue()); } java.lang.Integer i = val as java.lang.Integer; if (i != null) { return(i.intValue()); } java.lang.Float f = val as java.lang.Float; if (f != null) { return(f.floatValue()); } java.lang.Long l = val as java.lang.Long; if (l != null) { return(l.longValue()); } java.lang.Double d = val as java.lang.Double; if (d != null) { return(d.doubleValue()); } else { throw new java.lang.IllegalArgumentException(); } #endif }
public static bool Equals(javaFloat self, object obj) { float m_value = self.floatValue(); if (!(obj is Single)) { return(false); } float temp = ((Single)obj); if (temp == m_value) { return(true); } return(javaFloat.isNaN(temp) && javaFloat.isNaN(m_value)); }
public static int CompareTo(javaFloat self, object value) { float m_value = self.floatValue(); if (value == null) { return(1); } if (value is Single) { float f = (float)value; if (m_value < f) { return(-1); } if (m_value > f) { return(1); } if (m_value == f) { return(0); } // At least one of the values is NaN. if (javaFloat.isNaN(m_value)) { return(javaFloat.isNaN(f) ? 0 : -1); } else // f is NaN. { return(1); } } throw new ArgumentException(Environment.GetResourceString("Arg_MustBeSingle")); }
public static TypeCode GetTypeCode(javaFloat self) { return(TypeCode.Single); }
public static string ToString(javaFloat self, string format, IFormatProvider provider) { float m_value = self.floatValue(); return(Number.FormatSingle(m_value, format, NumberFormatInfo.GetInstance(provider))); }
public static SingleMap GetAdapter(javaFloat self) { return(new SingleMap(self.floatValue())); }
public static string ToString(javaFloat self, string format) { float m_value = self.floatValue(); return(Number.FormatSingle(m_value, format, NumberFormatInfo.CurrentInfo)); }
/* * public static java.lang.String nativeTypeToJavaTypeName(global::System.Type nativeType) { * string result; * _nTIB tib; * if(!tibTable.TryGetValue(nativeType, out tib)) { * // if it is not already in the table, * // then the native type name is the same as the java counterpart * result = nativeType.ToString(); * tib = new _nTIB(nativeType, result); * tibTable.Add(nativeType, tib); * jNameTable.Add(result, tib); * bootstrapSetClass(tib); * } else { * result = tib.getJavaName(); * } * return org.xmlvm._nUtil.toJavaString(result); * } */ public static java.lang.Object boxIfPrimitive(global::System.Object aValue, global::System.Type aType) { if (!aType.IsPrimitive) { return((java.lang.Object)aValue); // do nothing } else if (aType.Equals(booleanType)) { java.lang.Boolean boolBox = new java.lang.Boolean(); boolBox.@this((bool)aValue); return(boolBox); } else if (aType.Equals(byteType)) { java.lang.Byte byteBox = new java.lang.Byte(); byteBox.@this((sbyte)aValue); return(byteBox); } else if (aType.Equals(charType)) { java.lang.Character charBox = new java.lang.Character(); charBox.@this((char)aValue); return(charBox); } else if (aType.Equals(shortType)) { java.lang.Short shortBox = new java.lang.Short(); shortBox.@this((short)aValue); return(shortBox); } else if (aType.Equals(intType)) { java.lang.Integer intBox = new java.lang.Integer(); intBox.@this((int)aValue); return(intBox); } else if (aType.Equals(longType)) { java.lang.Long longBox = new java.lang.Long(); longBox.@this((long)aValue); return(longBox); } else if (aType.Equals(floatType)) { java.lang.Float floatBox = new java.lang.Float(); floatBox.@this((float)aValue); return(floatBox); } else if (aType.Equals(doubleType)) { java.lang.Double doubleBox = new java.lang.Double(); doubleBox.@this((double)aValue); return(doubleBox); } else if (aType.Equals(voidType)) { java.lang.Void voidBox = new java.lang.Void(); voidBox.@this(); return(voidBox); } else { throw new org.xmlvm._nNativeImplementationException(); } }
public static java.lang.Object boxIfPrimitive(global::System.Object aValue, global::System.Type aType) { if (!aType.GetTypeInfo().IsPrimitive) { return (java.lang.Object) aValue; // do nothing } else if (aType.Equals(booleanType)) { java.lang.Boolean boolBox = new java.lang.Boolean(); boolBox.@this((bool) aValue); return boolBox; } else if (aType.Equals(byteType)) { java.lang.Byte byteBox = new java.lang.Byte(); byteBox.@this((sbyte) aValue); return byteBox; } else if (aType.Equals(charType)) { java.lang.Character charBox = new java.lang.Character(); charBox.@this((char) aValue); return charBox; } else if (aType.Equals(shortType)) { java.lang.Short shortBox = new java.lang.Short(); shortBox.@this((short) aValue); return shortBox; } else if (aType.Equals(intType)) { java.lang.Integer intBox = new java.lang.Integer(); intBox.@this((int) aValue); return intBox; } else if (aType.Equals(longType)) { java.lang.Long longBox = new java.lang.Long(); longBox.@this((long) aValue); return longBox; } else if (aType.Equals(floatType)) { java.lang.Float floatBox = new java.lang.Float(); floatBox.@this((float) aValue); return floatBox; } else if (aType.Equals(doubleType)) { java.lang.Double doubleBox = new java.lang.Double(); doubleBox.@this((double) aValue); return doubleBox; } else if (aType.Equals(voidType)) { java.lang.Void voidBox = new java.lang.Void(); voidBox.@this(); return voidBox; } else { throw new org.xmlvm._nNativeImplementationException(); } }
public static global::System.Object get(global::java.lang.Object n1, int n2) { //XMLVM_BEGIN_WRAPPER[java.lang.reflect.Array: java.lang.Object get(java.lang.Object, int)] throw new org.xmlvm._nNotYetImplementedException("native/wrapper method not yet implemented"); if (n1 == null) { java.lang.NullPointerException jex = new java.lang.NullPointerException(); jex.@this(); throw new org.xmlvm._nExceptionAdapter(jex); } else if (n1 is org.xmlvm._nArrayAdapter <object> ) { return(((org.xmlvm._nArrayAdapter <object>)n1)[n2]); } else if (n1 is org.xmlvm._nArrayAdapter <bool> ) { bool unwrappedBoolean = ((org.xmlvm._nArrayAdapter <bool>)n1)[n2]; java.lang.Boolean result = new java.lang.Boolean(); result.@this(unwrappedBoolean); return(result); } else if (n1 is org.xmlvm._nArrayAdapter <sbyte> ) { sbyte unwrappedByte = ((org.xmlvm._nArrayAdapter <sbyte>)n1)[n2]; java.lang.Byte result = new java.lang.Byte(); result.@this(unwrappedByte); return(result); } else if (n1 is org.xmlvm._nArrayAdapter <char> ) { char unwrappedChar = ((org.xmlvm._nArrayAdapter <char>)n1)[n2]; java.lang.Character result = new java.lang.Character(); result.@this(unwrappedChar); return(result); } else if (n1 is org.xmlvm._nArrayAdapter <short> ) { short unwrappedShort = ((org.xmlvm._nArrayAdapter <short>)n1)[n2]; java.lang.Short result = new java.lang.Short(); result.@this(unwrappedShort); return(result); } else if (n1 is org.xmlvm._nArrayAdapter <int> ) { int unwrappedInteger = ((org.xmlvm._nArrayAdapter <int>)n1)[n2]; java.lang.Integer result = new java.lang.Integer(); result.@this(unwrappedInteger); return(result); } else if (n1 is org.xmlvm._nArrayAdapter <long> ) { long unwrappedLong = ((org.xmlvm._nArrayAdapter <long>)n1)[n2]; java.lang.Long result = new java.lang.Long(); result.@this(unwrappedLong); return(result); } else if (n1 is org.xmlvm._nArrayAdapter <float> ) { float unwrappedFloat = ((org.xmlvm._nArrayAdapter <float>)n1)[n2]; java.lang.Float result = new java.lang.Float(); result.@this(unwrappedFloat); return(result); } else if (n1 is org.xmlvm._nArrayAdapter <double> ) { double unwrappedDouble = ((org.xmlvm._nArrayAdapter <double>)n1)[n2]; java.lang.Double result = new java.lang.Double(); result.@this(unwrappedDouble); return(result); } else if (!(n1 is org.xmlvm._nIArray)) { // it is not an org.xmlvm._nIArray java.lang.IllegalArgumentException jex = new java.lang.IllegalArgumentException(); jex.@this(org.xmlvm._nUtil.toJavaString("Not an array")); throw new org.xmlvm._nExceptionAdapter(jex); } else { // something went wrong throw new org.xmlvm._nNativeImplementationException(); } //XMLVM_END_WRAPPER[java.lang.reflect.Array: java.lang.Object get(java.lang.Object, int)] }