getFirst

Returns the first element of an iterable. In the case of a List it is the element at the first index. In the
case of any other Collection, it is the first element that would be returned during an iteration. If the
iterable is empty, null is returned. If null is a valid element of the container, then a developer would need to
check to see if the iterable is empty to validate that a null result was not due to the container being empty.

The order of Sets are not guaranteed (except for TreeSets and other Ordered Set implementations), so if you use
this method, the first element could be any element from the Set.

getLast

Returns the last element of an iterable. In the case of a List it is the element at the last index. In the case
of any other Collection, it is the last element that would be returned during an iteration. If the iterable is
empty, null is returned. If null is a valid element of the container, then a developer would need to check to
see if the iterable is empty to validate that a null result was not due to the container being empty.

The order of Sets are not guaranteed (except for TreeSets and other Ordered Set implementations), so if you use
this method, the last element could be any element from the Set.