Examples of UnsignedByte


Examples of propel.core.userTypes.UnsignedByte

    if (targetType.equals(Period.class))
      return StringUtils.parseTimeSpan(str).toPeriod();
    if (targetType.equals(Int128.class))
      return StringUtils.parseInt128(str);
    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))
View Full Code Here

Examples of propel.core.userTypes.UnsignedByte

  @Validate
  public static UnsignedByte parseUInt8(@NotNull final String value, @NotNull final UnsignedByte minValue,
                                        @NotNull final UnsignedByte maxValue)
  {
    // parse
    UnsignedByte result;
    try
    {
      result = new UnsignedByte(value);
    }
    catch(Throwable e)
    {
      throw new NumberFormatException("The value '" + value + "' could not be parsed: " + e.getMessage());
    }

    // sanity check
    if (result.compareTo(minValue) < 0)
      throw new NumberFormatException("Value (" + result + ") was less than allowed minimum (" + minValue + ").");
    if (result.compareTo(maxValue) > 0)
      throw new NumberFormatException("Value (" + result + ") was more than allowed maximum (" + maxValue + ").");

    return result;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.