Skip to content

Commit

Permalink
Minor renames in content builder
Browse files Browse the repository at this point in the history
  • Loading branch information
martinfurmanski committed Jun 11, 2018
1 parent f413f3b commit de51097
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -45,7 +45,7 @@ public static <C> ContentBuilder<C> unfinished( Function<C,C> contentFunction )


public static <C> ContentBuilder<C> finished( C content ) public static <C> ContentBuilder<C> finished( C content )
{ {
return new ContentBuilder<>( c1 -> content, true ); return new ContentBuilder<>( ignored -> content, true );
} }


private ContentBuilder( Function<CONTENT,CONTENT> contentFunction, boolean isComplete ) private ContentBuilder( Function<CONTENT,CONTENT> contentFunction, boolean isComplete )
Expand All @@ -63,18 +63,18 @@ public boolean isComplete()
} }


/** Composes this with the given builder and updates {@link #isComplete()} with the provided builder. /** Composes this with the given builder and updates {@link #isComplete()} with the provided builder.
* @param replicatedContentBuilder that will be combined with this builder * @param contentBuilder that will be combined with this builder
* @return The combined builder * @return The combined builder
* @throws IllegalStateException if the current builder is already complete * @throws IllegalStateException if the current builder is already complete
*/ */
public ContentBuilder<CONTENT> combine( ContentBuilder<CONTENT> replicatedContentBuilder ) public ContentBuilder<CONTENT> combine( ContentBuilder<CONTENT> contentBuilder )
{ {
if ( isComplete ) if ( isComplete )
{ {
throw new IllegalStateException( "This content builder has already completed and cannot be combined." ); throw new IllegalStateException( "This content builder has already completed and cannot be combined." );
} }
contentFunction = contentFunction.compose( replicatedContentBuilder.contentFunction ); contentFunction = contentFunction.compose( contentBuilder.contentFunction );
isComplete = replicatedContentBuilder.isComplete; isComplete = contentBuilder.isComplete;
return this; return this;
} }


Expand Down

0 comments on commit de51097

Please sign in to comment.