fork download
  1. import com.google.common.collect.ImmutableMap;
  2.  
  3.  
  4.  
  5.  
  6.  
  7. class Ideone
  8.  
  9. {
  10.  
  11. public static void main (String[] args) throws java.lang.Exception
  12. {
  13. ImmutableMap<String, Long> DEFAULT_LIMIT = new ImmutableMap.Builder<String, Long>()
  14. .put("test", 30L)
  15. .put("tester", 60L)
  16. .put("better", 90L)
  17. .put("work", 50L)
  18. .put("orelse", 100L)
  19. .build();
  20. System.out.println(DEFAULT_LIMIT.getOrDefault("tester", 5L));
  21. }
  22. }
Success #stdin #stdout 0.1s 55372KB
stdin
Standard input is empty
stdout
60