Inheritance: global::java.lang.Number, global::java.lang.Comparable
Esempio n. 1
0
 internal static void ck(BufferN b, double got, double expected)
 {
     if (expected != got)
     {
         fail(b,
              Double.toString(expected), (char)expected,
              Double.toString(got), (char)got);
     }
 }
Esempio n. 2
0
        private void assertRealValue(AttributeValue attr, double value)
        {
            Assert.IsInstanceOfType(attr.getValue(), typeof(PrimitiveObjectBlock));
            PrimitiveObjectBlock pob = (PrimitiveObjectBlock)attr.getValue();

            Assert.IsInstanceOfType(pob.getSimpleValue(), typeof(RealValue));
            RealValue actual = (RealValue)pob.getSimpleValue();

            java.lang.Double expected = new java.lang.Double(value);
            Assert.AreEqual(actual.getValue(), expected);
        }
Esempio n. 3
0
		/// <summary>
		/// Compares two <code>Double</code> objects numerically.
		/// </summary>
		public int compareTo(Double @anotherDouble)
		{
			return default(int);
		}
Esempio n. 4
0
    public static void set(object arrayObj, int index, object value)
    {
        if (arrayObj == null)
        {
            throw new java.lang.NullPointerException();
        }
        Type type = arrayObj.GetType();

        if (ReflectUtil.IsVector(type) && ClassLoaderWrapper.GetWrapperFromType(type.GetElementType()).IsPrimitive)
        {
            java.lang.Boolean booleanValue = value as java.lang.Boolean;
            if (booleanValue != null)
            {
                setBoolean(arrayObj, index, booleanValue.booleanValue());
                return;
            }
            java.lang.Byte byteValue = value as java.lang.Byte;
            if (byteValue != null)
            {
                setByte(arrayObj, index, byteValue.byteValue());
                return;
            }
            java.lang.Character charValue = value as java.lang.Character;
            if (charValue != null)
            {
                setChar(arrayObj, index, charValue.charValue());
                return;
            }
            java.lang.Short shortValue = value as java.lang.Short;
            if (shortValue != null)
            {
                setShort(arrayObj, index, shortValue.shortValue());
                return;
            }
            java.lang.Integer intValue = value as java.lang.Integer;
            if (intValue != null)
            {
                setInt(arrayObj, index, intValue.intValue());
                return;
            }
            java.lang.Float floatValue = value as java.lang.Float;
            if (floatValue != null)
            {
                setFloat(arrayObj, index, floatValue.floatValue());
                return;
            }
            java.lang.Long longValue = value as java.lang.Long;
            if (longValue != null)
            {
                setLong(arrayObj, index, longValue.longValue());
                return;
            }
            java.lang.Double doubleValue = value as java.lang.Double;
            if (doubleValue != null)
            {
                setDouble(arrayObj, index, doubleValue.doubleValue());
                return;
            }
        }
        try
        {
            CheckArray(arrayObj).SetValue(value, index);
        }
        catch (InvalidCastException)
        {
            throw new java.lang.IllegalArgumentException("argument type mismatch");
        }
        catch (IndexOutOfRangeException)
        {
            throw new java.lang.ArrayIndexOutOfBoundsException();
        }
    }
 private void assertRealValue(AttributeValue attr, double value)
 {
     Assert.IsInstanceOfType(attr.getValue(), typeof(PrimitiveObjectBlock));
     PrimitiveObjectBlock pob = (PrimitiveObjectBlock)attr.getValue();
     Assert.IsInstanceOfType(pob.getSimpleValue(), typeof(RealValue));
     RealValue actual = (RealValue)pob.getSimpleValue();
     java.lang.Double expected = new java.lang.Double(value);
     Assert.AreEqual(actual.getValue(), expected);
 }