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