This repository was archived by the owner on May 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed
src/main/java/com/launchdarkly/client Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ repositories {
1111
1212allprojects {
1313 group = ' com.launchdarkly'
14- version = " 0.15.0 "
14+ version = " 0.16.0-SNAPSHOT "
1515 sourceCompatibility = 1.6
1616 targetCompatibility = 1.6
1717}
Original file line number Diff line number Diff line change @@ -291,8 +291,19 @@ public Builder custom(String k, Boolean b) {
291291 * @param k the key for the list
292292 * @param vs the values for the attribute
293293 * @return the builder
294+ * @deprecated As of version 0.16.0, renamed to {@link #customString(String, List<String>)}
294295 */
295296 public Builder custom (String k , List <String > vs ) {
297+ return this .customString (k , vs );
298+ }
299+
300+ /**
301+ * Add a list of {@link java.lang.String}-valued custom attributes
302+ * @param k the key for the list
303+ * @param vs the values for the attribute
304+ * @return the builder
305+ */
306+ public Builder customString (String k , List <String > vs ) {
296307 JsonArray array = new JsonArray ();
297308 for (String v : vs ) {
298309 if (v != null ) {
@@ -302,6 +313,23 @@ public Builder custom(String k, List<String> vs) {
302313 custom .put (k , array );
303314 return this ;
304315 }
316+
317+ /**
318+ * Add a list of {@link java.lang.Integer}-valued custom attributes
319+ * @param k the key for the list
320+ * @param vs the values for the attribute
321+ * @return the builder
322+ */
323+ public Builder customInt (String k , List <Integer > vs ) {
324+ JsonArray array = new JsonArray ();
325+ for (Integer v : vs ) {
326+ if (v != null ) {
327+ array .add (new JsonPrimitive (v ));
328+ }
329+ }
330+ custom .put (k , array );
331+ return this ;
332+ }
305333
306334 /**
307335 * Build the configured {@link com.launchdarkly.client.LDUser} object
You can’t perform that action at this time.
0 commit comments