Java List Create createListOfOneItem(Object item)

Here you can find the source of createListOfOneItem(Object item)

Description

create List Of One Item

License

Open Source License

Declaration

public static List createListOfOneItem(Object item) 

Method Source Code


//package com.java2s;
import java.util.ArrayList;
import java.util.List;

public class Main {
    public static List createListOfOneItem(Object item) {
        List list = new ArrayList();
        list.add(item);/* w  ww . j  av a 2 s. c  om*/
        return list;
    }
}

Related

  1. createListFromCollection(Collection collection)
  2. createListFromCommaDelimitedString(String access)
  3. createListFromDotSeparatedString(String s)
  4. createListFromList(Collection collection)
  5. createListOfObjects(T... elements)
  6. createListOfValidNumberOfPoints(int[] terms, int min, int max)
  7. createListWithArray(Object[] array)
  8. createListWithObjects(Object... objects)
  9. createMapFromList(List list)