Java List First Item getFirstElement(List collection)

Here you can find the source of getFirstElement(List collection)

Description

get First Element

License

Apache License

Declaration

public static <T> T getFirstElement(List<T> collection) 

Method Source Code

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

import java.util.List;

public class Main {
    public static <T> T getFirstElement(List<T> collection) {
        return collection.iterator().next();
    }//from  www. j  a v a  2  s  . com
}

Related

  1. getFirst(List source)
  2. getFirstAsString(Map> multiValueMap, String key)
  3. getFirstColumn(List> llo, String reason)
  4. getFirstDuplicateValue(List values)
  5. getFirstElement(List list)
  6. getFirstElement(List list)
  7. getFirstElement(List list)
  8. getFirstElementFromList(List list)
  9. getFirstFromList(List list)