Skip to content

Commit

Permalink
Explicitly specify return types for 3 public functions
Browse files Browse the repository at this point in the history
  • Loading branch information
dlurton authored and popematt committed Feb 24, 2022
1 parent 9237271 commit 32c4d28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/com/amazon/ionelement/api/IonElementLoader.kt
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,17 @@ data class IonElementLoaderOptions(

/** Creates an [IonElementLoader] implementation with the specified [options]. */
@JvmOverloads
fun createIonElementLoader(options: IonElementLoaderOptions = IonElementLoaderOptions()) =
fun createIonElementLoader(options: IonElementLoaderOptions = IonElementLoaderOptions()): IonElementLoader =
IonElementLoaderImpl(options)

/** Provides syntactically lighter way of invoking [IonElementLoader.loadSingleElement]. */
@JvmOverloads
fun loadSingleElement(ionText: String, options: IonElementLoaderOptions = IonElementLoaderOptions()) =
fun loadSingleElement(ionText: String, options: IonElementLoaderOptions = IonElementLoaderOptions()): AnyElement =
createIonElementLoader(options).loadSingleElement(ionText)

/** Provides syntactically lighter method of invoking [IonElementLoader.loadSingleElement]. */
@JvmOverloads
fun loadSingleElement(ionReader: IonReader, options: IonElementLoaderOptions = IonElementLoaderOptions()) =
fun loadSingleElement(ionReader: IonReader, options: IonElementLoaderOptions = IonElementLoaderOptions()): AnyElement =
createIonElementLoader(options).loadSingleElement(ionReader)

/** Provides syntactically lighter method of invoking [IonElementLoader.loadAllElements]. */
Expand Down

0 comments on commit 32c4d28

Please sign in to comment.