implement a whole bunch of simple methods.

PredicateUtilities.java 949B

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