Add an optional decimal part:
if (tokens[i].matches("[0-9]*([.][0-9]+)?"))
Use asterisk to make the integer portion optional. The problem with this expression, however, that now it could match an empty string. A better (but longer) expression would match a string that starts in a decimal point in a separate subexpression, as follows:
if (tokens[i].matches("[0-9]+([.][0-9]+)?|[.][0-9]+"))