@Override public GroupDataSummary union(GroupDataSummary a, GroupDataSummary b) { return GroupDataSummary.mergeInPlace(a, b); }
/** * This method merges two {@link GroupDataSummary} into each other. It picks the first non-null parameter to * merge into and returns that after merge. * * @param a The first {@link GroupDataSummary} to merge. * @param b The second {@link GroupDataSummary} to merge. * @return The resulting merged summary or null if both arguments were null. */ public static GroupDataSummary mergeInPlace(GroupDataSummary a, GroupDataSummary b) { if (a != null) { a.mergeInPlace(b); return a; } else if (b != null) { return b; } return null; }