budget/src/main/java/budget/backend/stores/TagStore.java
@Override
  public boolean add(String composedString) {
    boolean success = true;
    Tag n = null;
    try {
      String[] help = composedString.split(";");
      if (help.length != 3) success = false;
      else{
        iTag parent = find(help[2]);
        n = new Tag(parent, new LinkedList<Tag>(), help[0], help[1]);
        dataChecker.verifyTag(n);
      }
    } catch (Exception e) {
      System.out.println(e.getMessage());
      success = false;
    } finally{
      if (success && n != null)
        map.put(n.getId(), n);
    }
      return success;
  }
/**
   * Add a new object to the structure, given the composedString format. 
   * @param composedString (<id>;<name>;<parentID>)
   */
Add a new object to the structure, given the composedString format.
@param composedString (;;)
Add a new object to the structure given the composedString format . @param composedString ( ;; )
@Override
  public boolean add(String composedString) {
    boolean success = true;
    Tag n = null;
    try {
      String[] help = composedString.split(";");
      if (help.length != 3) success = false;
      else{
        iTag parent = find(help[2]);
        n = new Tag(parent, new LinkedList<Tag>(), help[0], help[1]);
        dataChecker.verifyTag(n);
      }
    } catch (Exception e) {
      System.out.println(e.getMessage());
      success = false;
    } finally{
      if (success && n != null)
        map.put(n.getId(), n);
    }
      return success;
  }
@ Override public boolean add ( String composedString ) { boolean success = true ; Tag n = null ; try { String [ ] help = composedString . split ( ";" ) ; if ( help . length != 3 ) success = false ; else { iTag parent = find ( help [ 2 ] ) ; n = new Tag ( parent , new LinkedList < Tag > ( ) , help [ 0 ] , help [ 1 ] ) ; dataChecker . verifyTag ( n ) ; } } catch ( Exception e ) { System . out . println ( e . getMessage ( ) ) ; success = false ; } finally { if ( success && n != null ) map . put ( n . getId ( ) , n ) ; } return success ; }
Add a new object to the structure, given the composedString format.
Add a new object to the structure given the composedString format .