Here you can find the source of merge(Collection dest, Collection src)
Parameter | Description |
---|---|
dest | Collection |
src | Collection |
public static Collection merge(Collection dest, Collection src)
//package com.java2s; import java.util.Collection; public class Main { /**/* w w w .j a v a 2 s.c o m*/ * Method merge * @param dest Collection * @param src Collection * @return Collection */ public static Collection merge(Collection dest, Collection src) { if (src == null) { return dest; } if (dest == null) { return src; } dest.addAll(src); return dest; } }