public void addGroup(Group g) {
    if (immutable) throw new IllegalStateException("Cant modify");

    if (findGroup(g.getShortName()) != null)
      throw new IllegalArgumentException("Group name (" + g.getShortName() + ") must be unique within Group " + getShortName());

    groups.add(g);
    g.setParentGroup(this); // groups are a tree - only one parent
  }
public void addGroup(Group g) {
    if (immutable) throw new IllegalStateException("Cant modify");

    if (findGroup(g.getShortName()) != null)
      throw new IllegalArgumentException("Group name (" + g.getShortName() + ") must be unique within Group " + getShortName());

    groups.add(g);
    g.setParentGroup(this); 
  }
public void addGroup ( Group g ) { if ( immutable ) throw new IllegalStateException ( "Cant modify" ) ; if ( findGroup ( g . getShortName ( ) ) != null ) throw new IllegalArgumentException ( "Group name (" + g . getShortName ( ) + ") must be unique within Group " + getShortName ( ) ) ; groups . add ( g ) ; g . setParentGroup ( this ) ; // groups are a tree - only one parent }
Add a nested Group

@param g add this Group.
Add a nested Group