Adds an info field @param key key for field @param values values for the field. Any individual value containing a comma will be split. @return this, for call chaining
(String key, String... values)
| 389 | * @return this, for call chaining |
| 390 | */ |
| 391 | public VcfRecord addInfo(String key, String... values) { |
| 392 | final String old = mInfo.get(key); |
| 393 | if (values == null) { |
| 394 | mInfo.put(key, old == null ? "" : old); |
| 395 | } else { |
| 396 | final String joined = StringUtils.join(ALT_CALL_INFO_SEPARATOR, values); |
| 397 | mInfo.put(key, old == null || old.length() == 0 ? joined : StringUtils.join(ALT_CALL_INFO_SEPARATOR, old, joined)); |
| 398 | } |
| 399 | return this; |
| 400 | } |
| 401 | |
| 402 | /** |
| 403 | * Adds or resets an info field |