/** * Creates a new short value transcoder. * * @param b whether this transcoder is operating on a primitive */ public ShortValueTranscoder(final boolean b) { setPrimitive(b); }
@Override public Class<Integer> getType() { return isPrimitive() ? int.class : Integer.class; } }
@Override public Class<Long> getType() { return isPrimitive() ? long.class : Long.class; } }
@Override public ZonedDateTime convert(final String s) { final GeneralizedTimeValueTranscoder transcoder = new GeneralizedTimeValueTranscoder(); return transcoder.decodeStringValue(s); } }
/** * This will convert the supplied value to a hex encoded string. Returns null if the supplied byte array is null. * * @param value to hex encode * * @return hex encoded value */ public static char[] hexEncode(final byte[] value) { return value != null ? Hex.encode(value) : null; }
/** * This will decode the supplied value as a hex encoded string to a byte[]. Returns null if the supplied character * array is null. * * @param value to hex decode * * @return hex decoded value */ public static byte[] hexDecode(final char[] value) { return value != null ? Hex.decode(value) : null; }
/** * Creates a new boolean value transcoder. * * @param b whether this transcoder is operating on a primitive */ public BooleanValueTranscoder(final boolean b) { setPrimitive(b); }
/** * Creates a new float value transcoder. * * @param b whether this transcoder is operating on a primitive */ public FloatValueTranscoder(final boolean b) { setPrimitive(b); }
/** * Creates a new long value transcoder. * * @param b whether this transcoder is operating on a primitive */ public LongValueTranscoder(final boolean b) { setPrimitive(b); }
/** * Creates a new integer value transcoder. * * @param b whether this transcoder is operating on a primitive */ public IntegerValueTranscoder(final boolean b) { setPrimitive(b); }
@Override public Class<Float> getType() { return isPrimitive() ? float.class : Float.class; } }
@Override public Class<Short> getType() { return isPrimitive() ? short.class : Short.class; } }
@Override public Class<Double> getType() { return isPrimitive() ? double.class : Double.class; } }
@Override public Class<Boolean> getType() { return isPrimitive() ? boolean.class : Boolean.class; } }
/** * Creates a new short value transcoder. * * @param b whether this transcoder is operating on a primitive */ public ShortValueTranscoder(final boolean b) { setPrimitive(b); }
@Override public Class<Integer> getType() { return isPrimitive() ? int.class : Integer.class; } }
@Override public Class<Long> getType() { return isPrimitive() ? long.class : Long.class; } }
/** * Creates a new boolean value transcoder. * * @param b whether this transcoder is operating on a primitive */ public BooleanValueTranscoder(final boolean b) { setPrimitive(b); }
/** * Creates a new float value transcoder. * * @param b whether this transcoder is operating on a primitive */ public FloatValueTranscoder(final boolean b) { setPrimitive(b); }
/** * Creates a new short value transcoder. * * @param b whether this transcoder is operating on a primitive */ public ShortValueTranscoder(final boolean b) { setPrimitive(b); }