fork(2) download
  1. import java.util.stream.*;
  2.  
  3. class Example {
  4. String getName() { return ""; }
  5. boolean before(int x) { return true; }
  6.  
  7. public static void main(String[] args) {
  8. int timestamp1 = 1, timestamp2 = 2;
  9.  
  10. Stream.<Example>empty()
  11. .filter(abc ->
  12. (abc.getName() == "ABC" && abc.before(timestamp1))
  13. || abc.before(timestamp2)
  14. );
  15. }
  16. }
Success #stdin #stdout 0.24s 321856KB
stdin
Standard input is empty
stdout
Standard output is empty