public static <T> MultiValue<T> remove(MultiValue<T> org, T removeItem) { if (org == null) { return null; } if (removeItem != null) { org.remove(removeItem); } return org.size() == 0 ? null : org; }
public static <T> MultiValue<T> add(MultiValue<T> org, T newItem, int bucketSize) { if (org == null) { return new MultiValue<T>(newItem, bucketSize); } else { org.add(newItem); } return org; }