예제 #1
0
 /**
  * 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));
     }
   }
 }
예제 #2
0
 /**
  * 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);
   }
 }
예제 #3
0
 /**
  * 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);
   }
 }