/** * Adds the supplied values for this attribute by encoding them with the supplied transcoder. * * @param <T> type attribute to encode * @param transcoder to encode value with * @param value to encode and add * @throws NullPointerException if value is null */ public <T> void addValue(final ValueTranscoder<T> transcoder, final T... value) { for (T t : value) { if (isBinary()) { attributeValues.add(transcoder.encodeBinaryValue(t)); } else { attributeValues.add(transcoder.encodeStringValue(t)); } } }
/** * Adds the supplied byte array as a value for this attribute. * * @param value to add * @throws NullPointerException if value is null */ public void addBinaryValue(final byte[]... value) { for (byte[] b : value) { attributeValues.add(b); } }
/** * Adds the supplied string as a value for this attribute. * * @param value to add * @throws NullPointerException if value is null */ public void addStringValue(final String... value) { for (String s : value) { attributeValues.add(s); } }