File hp/util/CompareUtil.lua
Functions
M.compare (a, b, comp) | Compare the b and a. Sets the comparison function as an argument. |
M.compareEQ (a, b) | Compare the b and a. |
M.compareGE (a, b) | Compare the b and a. |
M.compareGT (a, b) | Compare the b and a. |
M.compareLE (a, b) | Compare the b and a. |
M.compareLT (a, b) | Compare the b and a. |
M.compareNE (a, b) | Compare the b and a. |
Tables
CompareUtil | This is a utility class to do a comparison of the object. |
Functions
- M.compare (a, b, comp)
-
Compare the b and a.
Sets the comparison function as an argument.
Parameters
- a: Target.
- b: Target.
- comp: Function or a string constant.
Return value:
True if the comparison result is matched. - M.compareEQ (a, b)
-
Compare the b and a.
Parameters
- a: Target.
- b: Target.
Return value:
True if equal. - M.compareGE (a, b)
-
Compare the b and a.
Parameters
- a: Target.
- b: Target.
Return value:
True if greater than or equal. - M.compareGT (a, b)
-
Compare the b and a.
Parameters
- a: Target.
- b: Target.
Return value:
True if greater than. - M.compareLE (a, b)
-
Compare the b and a.
Parameters
- a: Target.
- b: Target.
Return value:
True if less than or equal. - M.compareLT (a, b)
-
Compare the b and a.
Parameters
- a: Target.
- b: Target.
Return value:
True if less than. - M.compareNE (a, b)
-
Compare the b and a.
Parameters
- a: Target.
- b: Target.
Return value:
True if not equal.