List of usage examples for java.util LinkedList LinkedList
public LinkedList()
From source file:Main.java
public static LinkedList<String> getDayLables() { LinkedList<String> labels = new LinkedList<String>(); labels.add("00"); labels.add("04"); labels.add("08"); labels.add("12"); labels.add("16"); labels.add("20"); labels.add("24"); return labels; }
From source file:Main.java
public static <E> LinkedList<E> getLinkedList() { return new LinkedList<E>(); }
From source file:Main.java
public static String[] arrayUnique(String[] a) { // array_unique List<String> list = new LinkedList<String>(); for (int i = 0; i < a.length; i++) { if (!list.contains(a[i])) { list.add(a[i]);/*from ww w . j a v a2s . c om*/ } } return (String[]) list.toArray(new String[list.size()]); }
From source file:Main.java
public static <E> List<E> makeList(Iterable<E> iter) { List<E> list = new LinkedList<E>(); for (E item : iter) { list.add(item);/*from www.j a v a 2 s . c o m*/ } return list; }
From source file:Main.java
/**** * LinkedList * @return */ public static <T> List<T> newLinkedList() { return new LinkedList<T>(); }
From source file:Main.java
public static String[] extractTags(String source) { final List<String> result = new LinkedList<String>(); for (String tag : source.split(",")) { if (tag.trim().length() > 0) result.add(tag.trim());/*from ww w . j a v a 2s. com*/ } return result.toArray(new String[result.size()]); }
From source file:Main.java
public static LinkedList<byte[]> eatUpJavaHeap(int eatUpSize, int atomSize) { LinkedList<byte[]> list = new LinkedList<byte[]>(); return eatUpJavaHeap(list, eatUpSize, atomSize); }
From source file:Main.java
public static <E> LinkedList<E> createLinkedList() { return new LinkedList<E>(); }
From source file:Main.java
public static final <E> LinkedList<E> createLinkedList(E... elements) { LinkedList<E> list = new LinkedList<E>(); addToCollection(list, elements);/* w w w. j av a 2s. c o m*/ return list; }
From source file:Main.java
public static String[] array_unique(String[] strs) { // array_unique List<String> list = new LinkedList<String>(); for (int i = 0; i < strs.length; i++) { if (!list.contains(strs[i])) { list.add(strs[i]);// www. j a v a2 s . c o m } } return (String[]) list.toArray(new String[list.size()]); }