public Optional<T> last(){
  Iterator<T> iterator=iterator();
  T value=null;
  while (iterator.hasNext())   value=iterator.next();
  return Optional.of(value);
}

public Optional < T > last ( ) { Iterator < T > iterator = iterator ( ) ; T value = null ; while ( iterator . hasNext ( ) ) value = iterator . next ( ) ; return Optional . of ( value ) ; }
convert an iterable stream into one last item of the stream .
