command / me.schlaubi.regnumutils.common / Misc / first

first

@Nullable open static fun <T : Any!> first(@NotNull collection: @NotNull MutableCollection<T>): @Nullable T?

Returns the first element of a Collection.

Parameters

collection - MutableCollection<T>: the collection

- the type of the elements

Return
T?: the element or null if the collection is empty