Java List Value Add All addToList(List dest, T src)

Here you can find the source of addToList(List dest, T src)

Description

add To List

License

Apache License

Declaration

public static <T> List<T> addToList(List<T> dest, T src) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.List;

public class Main {

    public static <T> List<T> addToList(List<T> dest, T src) {
        if (src != null && !dest.contains(src)) {
            dest.add(src);//from   w  w  w.j a v  a  2 s  .c  o m
        }
        return dest;
    }
}

Related

  1. addArrayToList(String[] array, List list)
  2. addArrayToList(T[] array, List list)
  3. addToList(List list, Object obj)
  4. addToList(List list, I item)
  5. AddToList(List tips, String tip)
  6. addToList(List list, T value)
  7. addToList(List list, T[] array)
  8. addToList(List list, U... items)