@Nullable public T pop(){
  if (myItemStack.size() == 1 && hasRootItem) {
    return null;
  }
  T removed=myItemStack.pop();
  updateText();
  return removed;
}

@ Nullable public T pop ( ) { if ( myItemStack . size ( ) == 1 && hasRootItem ) { return null ; } T removed = myItemStack . pop ( ) ; updateText ( ) ; return removed ; }
removes an element from the navigation stack .
