title: RecyclerView onBindViewHolder, assign data to variables or to the methods directly?
body: <p>In my <code>onBindViewHolder</code>, I need to set different text, based on the data.<br />
  E.g in short:</p>
  <pre><code>@Override
  public void onBindViewHolder(@NonNull RecHolder holder, int position) {
  currentItem = getItem(position);
  holder.name_product.setText(currentItem.getname_product());
  holder.amountBought.setText(currentItem.getAmount());
  holder.amountBought_type.setText(setPackText(currentItem.food_type.getCode(),currentItem.getAmount()));
  }
  </code></pre>
  <p>Or I can do it in this way:</p>
  <pre><code>int amount = currentItem.getAmount();
  int food_type = currentItem.food_type.getCode();
  holder.amountBought.setText(amount);
  holder.amountBought_type.setText(setPackText(food_type,amount));   
  </code></pre>
  <p>So my question is what solution is better, to pass data to methods directly or using variables?<br />
  In first sample I am asking <code>currentItem</code> twice (beacuse <code>currentItem.getAmount()</code> appears two times),<br />
  that's how I understand it.<br />
  In second sample, I assign the data to variables and later uses this variables (referation to the objects) and pass to the methods.
  I Measure time of each operation separately using <code>System.nanoTime();</code> but results were different at any time.</p>