Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. import java.util.regex.Matcher;
  2. import java.util.regex.Pattern;
  3.  
  4. /**This method checks if the operands are integers.
  5. *
  6. * @param s tag.
  7. * @return check tag.
  8. */
  9. public boolean isInteger(final String s)
  10. {
  11. final Matcher mat;
  12.  
  13. boolean check = true;
  14.  
  15. mat = INTEGER_PATTERN.matcher(s);
  16.  
  17. if(!mat.matches())
  18. {
  19. check = false;
  20. }
  21.  
  22. return check;
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement