PredicateUtilities.java 830B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. package DanDoBetterDrills;
  2. /**
  3. * Created by dan on 6/14/17.
  4. */
  5. public class PredicateUtilities {
  6. /**
  7. * @param x
  8. * @param y
  9. * @return true if `x` is greater than `y`
  10. */
  11. public Boolean isGreaterThan(int x, int y) {
  12. return x > y;
  13. }
  14. /**
  15. * @param x
  16. * @param y
  17. * @return true if `x` is less than `y`
  18. */
  19. public Boolean isLessThan(int x, int y) {
  20. return x < y;
  21. }
  22. /**
  23. * @param x
  24. * @param y
  25. * @return true if `x` is greater than or equal to `y`
  26. */
  27. public Boolean isGreaterThanOrEqualTo(int x, int y) {
  28. return x >= y;
  29. }
  30. /**
  31. * @param x
  32. * @param y
  33. * @return true if `x` is less than or equal to `y`
  34. */
  35. public Boolean isLessThanOrEqualTo(int x, int y) {
  36. return x <= y;
  37. }
  38. }