12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /**
  2. * Created by dan on 6/14/17.
  3. */
  4. public class PredicateUtilities
  5. {
  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. {
  13. if( x > y )
  14. {
  15. return true;
  16. }
  17. else
  18. {
  19. return false;
  20. }
  21. }
  22. /**
  23. * @param x
  24. * @param y
  25. * @return true if `x` is less than `y`
  26. */
  27. public Boolean isLessThan(int x, int y)
  28. {
  29. if( x < y )
  30. {
  31. return true ;
  32. }
  33. else
  34. {
  35. return false;
  36. }
  37. }
  38. /**
  39. * @param x
  40. * @param y
  41. * @return true if `x` is greater than or equal to `y`
  42. */
  43. public Boolean isGreaterThanOrEqualTo(int x, int y)
  44. {
  45. if ( x >=y )
  46. {
  47. return true;
  48. }
  49. else
  50. {
  51. return false;
  52. }
  53. }
  54. /**
  55. * @param x
  56. * @param y
  57. * @return true if `x` is less than or equal to `y`
  58. */
  59. public Boolean isLessThanOrEqualTo(int x, int y)
  60. {
  61. if ( x <= y )
  62. {
  63. return true;
  64. }
  65. else
  66. {
  67. return false;
  68. }
  69. }
  70. }