Java List Value Add add(List valList, Object src)

Here you can find the source of add(List valList, Object src)

Description

add

License

Open Source License

Declaration

public static List add(List valList, Object src) 

Method Source Code

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

import java.util.List;

public class Main {
    public static List add(List valList, Object src) {
        if (src == null) {
            return valList;
        }//  ww  w.  ja va 2s  .c  o m
        if (src instanceof List) {
            valList.addAll((List) src);
        } else {
            valList.add(src);
        }
        return valList;
    }
}

Related

  1. add(final Integer id, final TreeMap> map, T object)
  2. add(final List list, final T... objects)
  3. add(final List toList, final List fromList)
  4. add(List list, int index, Object element)
  5. add(List list, E element)
  6. add(List result, ClassLoader loader)
  7. add(List list, E element)
  8. add(List list, int index, T item)