Search for the minimum element in the list.

@param <E> the type of elements in this list.

@param list list that we are searching in.

@return the minimum element in the list.
962402
public static <E extends Comparable<E>> E searchMin(List<E> list) {
        if(list.size() == 0) {
            throw new IllegalArgumentException("The list you provided does not have any elements");
        }
        E min = list.get(0);
        for(int i = 1; i < list.size(); i++) {
            if(list.get(i).compareTo(min) < 0) {
                min = list.get(i);
            }
        }
        return min;
    }
489788
public void setList(List<?> list) {
		this.checkNull(list);
		this.list.add(list);
		this.type.add(List.class);
	}
700340
public static <E extends Comparable<E>> void sort(List<E> list) {
        while(!Sort.isSorted(list)) {
            FYShuffle.shuffle(list);
        }
    }
107270
public static <T> List<T> nullToEmpty(final List<T> list) {
        return list == null ? N.<T> emptyList() : list;
    }
335474
public static int size(Object list) {
        if (list == null)
            return 0;
        if (list instanceof List)
            return ((List<?>) list).size();
        return 1;
    }
10199
public static <T extends Comparable<? super T>> List<T> sort(final List<T> list) {
        Validate.notNull(list, "Cannot execute list sort: list is null");
        final Object[] a = list.toArray();
        Arrays.sort(a);
        
        return fillNewList(a, list.getClass());
    }
874337
private void sortCandidateList(ArrayList list) {
    java.util.Collections.sort(list, new java.util.Comparator() {
      public int compare(Object o1, Object o2) {
        // First sort, by score in index
        double scoreT = ( (Candidates) o1).getScore(),
            scoreU = ( (Candidates) o2).getScore();
        if (scoreU > scoreT) {
          return 1;
        }
        if (scoreU < scoreT) {
          return -1;
        }
        return 0;
      }
    }
    );
  }
41266
public static final <T> void quickSort(List<T> list, Comparator<T> comparator)
    {
        quickSort(list, 0, list.size()-1, comparator);
    }
1305313
public static final int lengthOf(WsByteBuffer[] list) {
        if (null == list) {
            return 0;
        }
        int length = 0;
        for (int i = 0; i < list.length && null != list[i]; i++) {
            length += list[i].remaining();
        }
        return length;
    }
1006869
private static <T> T firstOf(final List<T> list) {
        return list.isEmpty()? null: list.get(0);
    }
1131957
public static int indexOf(List<Node> list , int value ) {

		for (int i = 0; i < list.size(); i++) {
			if( list.get(i).which == value )
				return i;
		}

		return -1;
	}
639440
public <S> AnimaQuery<T> in(List<S> list) {
        return this.in(list.toArray());
    }
498277
public static boolean isListElementsEmpty(final List<String> l) {
        for (final String s : l) {
            if (s != null && s.trim().length() > 0) {
                return false;
            }
        }
        return true;
    }
1108501
public static <E> int indexOf(final List<E> list, final E value) {
        return list.indexOf(value);
    }
967744
public static <T> ArrayList<T> sortThis(ArrayList<T> list, Comparator<? super T> comparator)
    {
        int size = list.size();
        if (ArrayListIterate.canAccessInternalArray(list))
        {
            Arrays.sort(ArrayListIterate.getInternalArray(list), 0, size, comparator);
        }
        else
        {
            Collections.sort(list, comparator);
        }
        return list;
    }
734204
public static ListIterator listIterator(Object list)
    {
        if (list==null)
            return Collections.EMPTY_LIST.listIterator();
        if (list instanceof List)
            return ((List)list).listIterator();
        return getList(list).listIterator();
    }
35595
public static String join(List<String> list) {
    if (list == null) {
      return null;
    }

    StringBuilder joined = new StringBuilder();
    boolean first = true;

    for (String element : list) {
      if (first) {
        first = false;
      } else {
        joined.append(",");
      }
      joined.append(element);
    }

    return joined.toString();
  }