mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-04-01 09:50:16 +02:00
fix wrong commit message and commit date in git repository
This commit is contained in:
@@ -439,6 +439,50 @@ public class Util
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param iterable
|
||||
* @param <T>
|
||||
*
|
||||
* @return
|
||||
* @since 1.5
|
||||
*/
|
||||
public static <T> T getFirst(Iterable<T> iterable)
|
||||
{
|
||||
T result = null;
|
||||
|
||||
if (iterable != null)
|
||||
{
|
||||
result = getFirst(iterable.iterator());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param iterator
|
||||
* @param <T>
|
||||
*
|
||||
* @return
|
||||
* @since 1.5
|
||||
*/
|
||||
public static <T> T getFirst(Iterator<T> iterator)
|
||||
{
|
||||
T result = null;
|
||||
|
||||
if ((iterator != null) && iterator.hasNext())
|
||||
{
|
||||
result = iterator.next();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user