ppamorim

Untitled

Nov 10th, 2014
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. protected Adapter getAdapter() {
  2.         return (mRecyclerView != null ? mRecyclerView.getAdapter() : null);
  3.     }
  4.  
  5. //mesma coisa que:
  6.  
  7. RecyclerView mRecyclerView = null;
  8.  
  9. protected Adapter getAdapter() {
  10.         return (mRecyclerView != null ? mRecyclerView.getAdapter() : null);
  11.     }
  12.  
  13. //se o troco ta null, é lógico que vai retornar nulo, não precisa verificar
Advertisement
Add Comment
Please, Sign In to add comment