public StackImpl(Collection<T> initialContents){
  this();
  list.addAll(initialContents);
}

public StackImpl ( Collection < T > initialContents ) { this ( ) ; list . addAll ( initialContents ) ; }
creates a new stack , with the given initialcontents . the first element of initialcontents will be on the bottom of the stack , the last element will be on top of it .
