Package propel.core.userTypes

Examples of propel.core.userTypes.UnsignedInteger


   * @throws NumberFormatException A number could not be parsed.
   */
  @Validate
  public static UnsignedInteger fromBinaryToUInt32(@NotNull final String binary)
  {
    return new UnsignedInteger(new BigInteger(binary, 2));
  }
View Full Code Here


   * @throws NumberFormatException A number could not be parsed.
   */
  @Validate
  public static UnsignedInteger fromStringToUInt32(@NotNull final String value)
  {
    return new UnsignedInteger(value);
  }
View Full Code Here

   * @throws NumberFormatException A number could not be parsed.
   */
  @Validate
  public static UnsignedInteger fromHexToUInt32(@NotNull final String hex)
  {
    return new UnsignedInteger(new BigInteger(hex, 16));
  }
View Full Code Here

   * @throws NumberFormatException A number could not be parsed.
   */
  @Validate
  public static UnsignedInteger fromHexToUInt16(@NotNull final String hex)
  {
    return new UnsignedInteger(new BigInteger(hex, 16));
  }
View Full Code Here

    if (targetType.equals(UnsignedByte.class))
      return new UnsignedByte((short) (number.byteValue() & 0xFF));
    if (targetType.equals(UnsignedShort.class))
      return new UnsignedShort((int) (number.shortValue() & 0xFFFF));
    if (targetType.equals(UnsignedInteger.class))
      return new UnsignedInteger((long) (number.intValue() & 0xFFFFFFFF));
    if (targetType.equals(UnsignedLong.class))
    {
      // perform similar operation as above to get rid of the negative values
      long ln = new BigInteger(number.toString()).longValue();
      return new UnsignedLong(new BigInteger("0" + toBinary(ln)));
View Full Code Here

    if (targetType.equals(UnsignedByte.class))
      return new UnsignedByte((byte) ch);
    if (targetType.equals(UnsignedShort.class))
      return new UnsignedShort(ch);
    if (targetType.equals(UnsignedInteger.class))
      return new UnsignedInteger(ch);
    if (targetType.equals(UnsignedLong.class))
      return new UnsignedLong(new Integer(ch).toString());
    if (targetType.equals(SignedByte.class))
      return new SignedByte((byte) ch);
    if (targetType.equals(BigInteger.class))
View Full Code Here

    if (targetType.equals(UnsignedByte.class))
      return bool ? new UnsignedByte((byte) 1) : new UnsignedByte((byte) 0);
    if (targetType.equals(UnsignedShort.class))
      return bool ? new UnsignedShort(1) : new UnsignedShort(0);
    if (targetType.equals(UnsignedInteger.class))
      return bool ? new UnsignedInteger(1) : new UnsignedInteger(0);
    if (targetType.equals(UnsignedLong.class))
      return bool ? new UnsignedLong("1") : new UnsignedLong("0");
    if (targetType.equals(SignedByte.class))
      return bool ? new SignedByte("1") : new SignedByte("0");
    if (targetType.equals(BigInteger.class))
View Full Code Here

    if (targetType.equals(UnsignedByte.class))
      return new UnsignedByte(str);
    if (targetType.equals(UnsignedShort.class))
      return new UnsignedShort(str);
    if (targetType.equals(UnsignedInteger.class))
      return new UnsignedInteger(str);
    if (targetType.equals(UnsignedLong.class))
      return new UnsignedLong(str);
    if (targetType.equals(SignedByte.class))
      return new SignedByte(str);
    if (targetType.equals(BigInteger.class))
View Full Code Here

   * @throws NumberFormatException A number could not be parsed.
   */
  @Validate
  public static UnsignedInteger fromBinaryToUInt32(@NotNull final String binary)
  {
    return new UnsignedInteger(new BigInteger(binary, 2));
  }
View Full Code Here

   * @throws NumberFormatException A number could not be parsed.
   */
  @Validate
  public static UnsignedInteger fromStringToUInt32(@NotNull final String value)
  {
    return new UnsignedInteger(value);
  }
View Full Code Here

TOP

Related Classes of propel.core.userTypes.UnsignedInteger

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.