Advertisement
Guest User

Untitled

a guest
Feb 21st, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. Interceptor interceptorWithoutPrerequisites = new InterceptorWithoutPrerequisites();
  2. List<Interceptor> interceptors = singletonList(new InterceptorWithoutPrerequisites());
  3.  
  4. ИМХО читается лучше, чем
  5. List<Interceptor> interceptors = new ArrayList<>();
  6. Interceptor interceptor = new InterceptorLogical();
  7. Interceptor interceptorWithoutPrerequisites = new InterceptorWithoutPrerequisites();
  8. interceptors.add(interceptor);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement