Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void build(String key,String string) throws IOException, XLException {
- if (string.isEmpty()){
- cellMap.remove(key);
- }
- else if (string.startsWith("#")){
- cellMap.put(key, new StringCell(string));
- }
- else {
- ExprParser exprP = new ExprParser();
- Expr expr = exprP.build(string);
- ExprCell newCell = new ExprCell(expr);
- newCell.makeBomb();
- cellMap.put(key, newCell);
- try {
- for (Cell c: cellMap.getMap().values()){
- if(c != newCell){
- // System.out.println(" c!=newCell");
- if(c instanceof ExprCell){
- ((ExprCell) c.value()).value();
- }
- }
- }
- } catch (XLException e) {
- newCell.defuse();
- throw e;
- }
- newCell.defuse();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement