PredicateUtilities.java 960B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. if (x>y) {return true;
  12. } else return false;
  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. if (x < y) {return true;
  21. } else return false;
  22. }
  23. /**
  24. * @param x
  25. * @param y
  26. * @return true if `x` is greater than or equal to `y`
  27. */
  28. public Boolean isGreaterThanOrEqualTo(int x, int y) {
  29. if (x >= y) {return true;
  30. } else return false;
  31. }
  32. /**
  33. * @param x
  34. * @param y
  35. * @return true if `x` is less than or equal to `y`
  36. */
  37. public Boolean isLessThanOrEqualTo(int x, int y) {
  38. if (x <= y) {return true;
  39. } else return false;
  40. }
  41. }