public UnsignedLongEncoding getEncoding(final UnsignedLong val) { long l = val.longValue(); return l == 0L ? _zeroUnsignedLongEncoding : (l >= 0 && l <= 255L) ? _smallUnsignedLongEncoding : _unsignedLongEncoding; }
@Override public float floatValue() { return (float) longValue(); }
@Override public float floatValue() { return (float) longValue(); }
public UnsignedLongEncoding getEncoding(final UnsignedLong val) { long l = val.longValue(); return l == 0L ? _zeroUnsignedLongEncoding : (l <= 255L) ? _smallUnsignedLongEncoding : _unsignedLongEncoding; }
@Override public double doubleValue() { return (double) longValue(); }
public UnsignedLongEncoding getEncoding(final UnsignedLong val) { long l = val.longValue(); return l == 0L ? _zeroUnsignedLongEncoding : (l <= 255L) ? _smallUnsignedLongEncoding : _unsignedLongEncoding; }
public UnsignedLongEncoding getEncoding(final UnsignedLong val) { long l = val.longValue(); return l == 0L ? _zeroUnsignedLongEncoding : (l >= 0 && l <= 255L) ? _smallUnsignedLongEncoding : _unsignedLongEncoding; }
@Override public double doubleValue() { return (double) longValue(); }
@Override public float floatValue() { return (float) longValue(); }
@Override public double doubleValue() { return (double) longValue(); }
public void writeValue(final UnsignedLong val) { getEncoder().writeRaw((byte)val.longValue()); }
public void writeValue(final UnsignedLong val) { getEncoder().writeRaw((byte)val.longValue()); }
public void writeValue(final UnsignedLong val) { getEncoder().writeRaw(val.longValue()); }
public void writeValue(final UnsignedLong val) { getEncoder().writeRaw(val.longValue()); }
public void writeValue(final UnsignedLong val) { getEncoder().writeRaw(val.longValue()); }
public void writeValue(final UnsignedLong val) { getEncoder().writeRaw((byte)val.longValue()); }
public void writeValue(final UnsignedLong val) { getEncoder().writeRaw(val.longValue()); }
public void writeValue(final UnsignedLong val) { getEncoder().writeRaw((byte)val.longValue()); }
@Override public void setObject(final String name, final Object value) throws JMSException { try { // primitives and String Object val = value; if (value instanceof UnsignedInteger) { val = ((UnsignedInteger) value).intValue(); } else if (value instanceof UnsignedShort) { val = ((UnsignedShort) value).shortValue(); } else if (value instanceof UnsignedByte) { val = ((UnsignedByte) value).byteValue(); } else if (value instanceof UnsignedLong) { val = ((UnsignedLong) value).longValue(); } TypedProperties.setObjectProperty(new SimpleString(name), val, map); } catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } }
@Override public void setObject(final String name, final Object value) throws JMSException { try { // primitives and String Object val = value; if (value instanceof UnsignedInteger) { val = ((UnsignedInteger) value).intValue(); } else if (value instanceof UnsignedShort) { val = ((UnsignedShort) value).shortValue(); } else if (value instanceof UnsignedByte) { val = ((UnsignedByte) value).byteValue(); } else if (value instanceof UnsignedLong) { val = ((UnsignedLong) value).longValue(); } TypedProperties.setObjectProperty(new SimpleString(name), val, map); } catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } }