public TerminalSize with(TerminalSize size){
  if (equals(size)) {
    return this;
  }
  return size;
}

public TerminalSize with ( TerminalSize size ) { if ( equals ( size ) ) { return this ; } return size ; }
returns itself if it is equal to the supplied size , otherwise the supplied size . you can use this if you have a size field which is frequently recalculated but often resolves to the same size ; it will keep the same object in memory instead of swapping it out every cycle .
