public boolean canAcceptChild() {
        if (maxChildren == 0) {
            rejectReason = getDisplayName() + " does not accept any children.";
        } else if (getChildCount() >= maxChildren) {
            rejectReason = "Maximum child count exceeded for " + getDisplayName() + ".";
        } else {
            rejectReason = null;
        }
        
        return rejectReason == null;
    }
public boolean canAcceptChild ( ) { if ( maxChildren == 0 ) { rejectReason = getDisplayName ( ) + " does not accept any children." ; } else if ( getChildCount ( ) >= maxChildren ) { rejectReason = "Maximum child count exceeded for " + getDisplayName ( ) + "." ; } else { rejectReason = null ; } return rejectReason == null ; }
Returns true if this element may accept a child. Updates the reject reason with the result.

@return True if this element may accept a child. Updates the reject reason with the result.