@ Nullable public static < ELEMENTTYPE > ELEMENTTYPE getFirst ( @ Nullable final ELEMENTTYPE [ ] aArray , @ Nullable final ELEMENTTYPE aDefaultValue ) { return isEmpty ( aArray ) ? aDefaultValue : aArray [ 0 ] ; }
Get the first element of the array or the passed default if the passed array is empty .