Java List First Item mergeLists(List first, List second)

Here you can find the source of mergeLists(List first, List second)

Description

merge Lists

License

Open Source License

Declaration

public static <E> List<E> mergeLists(List<E> first, List<E> second) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.ArrayList;

import java.util.List;

public class Main {
    public static <E> List<E> mergeLists(List<E> first, List<E> second) {
        List<E> merged = new ArrayList<E>(first);
        for (E obj : second) {
            if (!merged.contains(obj))
                merged.add(obj);//from  ww w.ja va  2s.  co  m
        }
        return merged;
    }
}

Related

  1. isInOrder(List src, Object first, Object second)
  2. limit(List list, Long firstResult, Long maxResults)
  3. listWith(Object aFirstObject)
  4. merge(List first, List second)
  5. mergeLists(List first, List second)
  6. mergePreserveOrder(List first, List second)
  7. moveItemKindInFirst(final List list)
  8. nullSafeAppend(List first, List second)
  9. orderByFirstOccurenceInText(String listToOrder[], String textToParse, boolean fuzzy)