示例#1
0
 /// <summary>
 /// Composes this with the given builder and updates <seealso cref="isComplete()"/> with the provided builder. </summary>
 /// <param name="contentBuilder"> that will be combined with this builder </param>
 /// <returns> The combined builder </returns>
 /// <exception cref="IllegalStateException"> if the current builder is already complete </exception>
 public virtual ContentBuilder <CONTENT> Combine(ContentBuilder <CONTENT> contentBuilder)
 {
     if (_isComplete)
     {
         throw new System.InvalidOperationException("This content builder has already completed and cannot be combined.");
     }
     _contentFunction = _contentFunction.compose(contentBuilder._contentFunction);
     _isComplete      = contentBuilder._isComplete;
     return(this);
 }