Used the Character.isWhitespace instead of our own
This commit is contained in:
parent
2013750291
commit
6735cbc7ce
1 changed files with 1 additions and 18 deletions
|
@ -116,23 +116,6 @@ public class FormulaParser {
|
||||||
return tokenVector;
|
return tokenVector;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Identify white spaces (ie. spaces or tab)
|
|
||||||
*
|
|
||||||
* @param The character which is to be identified
|
|
||||||
* @return A boolean returning the result of the comparison
|
|
||||||
*/
|
|
||||||
private boolean isWhite(char c) {
|
|
||||||
|
|
||||||
boolean eq;
|
|
||||||
|
|
||||||
if(c==' ' | c=='\t')
|
|
||||||
eq = true;
|
|
||||||
else
|
|
||||||
eq = false;
|
|
||||||
return eq;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Identify + and - operators
|
* Identify + and - operators
|
||||||
*
|
*
|
||||||
|
@ -305,7 +288,7 @@ public class FormulaParser {
|
||||||
|
|
||||||
boolean success = true;
|
boolean success = true;
|
||||||
|
|
||||||
while(isWhite(look) && success) {
|
while(Character.isWhitespace(look) && success) {
|
||||||
success = getChar();
|
success = getChar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue