-
Notifications
You must be signed in to change notification settings - Fork 737
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore AbstractBuilder to package-private scope
- Loading branch information
1 parent
214ac20
commit 8ab119d
Showing
4 changed files
with
50 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/main/java/org/kohsuke/github/GitHubRequestBuilderDone.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package org.kohsuke.github; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* The done method for data object builder/updater. | ||
* | ||
* This interface can be used to make a Builder that supports both batch and single property changes. | ||
* <p> | ||
* Batching looks like this: | ||
* </p> | ||
* | ||
* <pre> | ||
* update().someName(value).otherName(value).done() | ||
* </pre> | ||
* <p> | ||
* Single changes look like this: | ||
* </p> | ||
* | ||
* <pre> | ||
* set().someName(value); | ||
* set().otherName(value); | ||
* </pre> | ||
* | ||
* @author Liam Newman | ||
* @param <R> | ||
* Final return type built by this builder returned when {@link #done()}} is called. | ||
*/ | ||
public interface GitHubRequestBuilderDone<R> { | ||
|
||
/** | ||
* Finishes a create or update request, committing changes. | ||
* | ||
* This method may update-in-place or not. Either way it returns the resulting instance. | ||
* | ||
* @return an instance with updated current data | ||
* @throws IOException | ||
* if there is an I/O Exception | ||
*/ | ||
R done() throws IOException; | ||
} |