Package com.peterhi

Examples of com.peterhi.intx


      } else if (type == Integer24.class) {
        writeRecursively(desc, int24.class,
          new int24((Integer24 )value), lookup);
      } else if (type == IntegerX.Signed.class) {
        writeRecursively(desc, intx.class,
          new intx((IntegerX.Signed )value), lookup);
      } else if (type == IntegerX.Unsigned.class) {
        writeRecursively(desc, uintx.class,
          new uintx((IntegerX.Unsigned )value), lookup);
      } else {
        throw new IllegalArgumentException(MessageFormat.format(
View Full Code Here


    } else if (type == double.class) {
      return readDouble();
    } else if (type == int24.class) {
      return new int24(this);
    } else if (type == intx.class) {
      return new intx(this);
    } else if (type == uintx.class) {
      return new uintx(this);
    } else if (type == Boolean.class) {
      int b = readByte();
      return (b == -1) ? null : (b != 0);
View Full Code Here

    PropUtil.setValue(p0, "floatValue", -1.0f);
    PropUtil.setValue(p0, "doubleValue", -1.0);
    PropUtil.setValue(p0, "int24Value",
      new int24(int24.MIN_24));
    PropUtil.setValue(p0, "intxValue",
      new intx(intx.MIN_62));
    PropUtil.setValue(p0, "uintxValue",
      new uintx(uintx.MAX_62));
   
    Assert.assertEquals(Boolean.TRUE,
      PropUtil.getValue(p0, "booleanValue"));
    Assert.assertEquals((byte )-1,
      PropUtil.getValue(p0, "byteValue"));
    Assert.assertEquals('c',
      PropUtil.getValue(p0, "charValue"));
    Assert.assertEquals((short )-1,
      PropUtil.getValue(p0, "shortValue"));
    Assert.assertEquals(-1,
      PropUtil.getValue(p0, "intValue"));
    Assert.assertEquals(-1L,
      PropUtil.getValue(p0, "longValue"));
    Assert.assertEquals(-1.0f,
      PropUtil.getValue(p0, "floatValue"));
    Assert.assertEquals(-1.0,
      PropUtil.getValue(p0, "doubleValue"));
    Assert.assertEquals(new int24(int24.MIN_24),
      PropUtil.getValue(p0, "int24Value"));
    Assert.assertEquals(new intx(intx.MIN_62),
      PropUtil.getValue(p0, "intxValue"));
    Assert.assertEquals(new uintx(uintx.MAX_62),
      PropUtil.getValue(p0, "uintxValue"));
   
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

TOP

Related Classes of com.peterhi.intx

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.