Skip to content

Commit

Permalink
move javadoc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sbarker2 committed Aug 30, 2024
1 parent 96cd51d commit 3ca5e73
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ import java.util.concurrent.ConcurrentHashMap
*
* Use [NadelCachingJsonNodes] for the most part because that is faster.
* It is the default implementation.
*
* @param data The JSON map data.
* @param pathPrefix For incremental (defer) payloads, this is the prefix that needs to be removed from the path.
*/
interface JsonNodes {
/**
Expand All @@ -24,10 +21,15 @@ interface JsonNodes {
fun getNodesAt(queryPath: NadelQueryPath, flatten: Boolean = false): List<JsonNode>

companion object {

internal var nodesFactory: (JsonMap, NadelQueryPath?) -> JsonNodes = { data, pathPrefix ->
NadelCachingJsonNodes(data, pathPrefix)
}

/**
* @param data The JSON map data.
* @param pathPrefix For incremental (defer) payloads, this is the prefix that needs to be removed from the path.
*/
operator fun invoke(data: JsonMap, pathPrefix: NadelQueryPath? = null): JsonNodes {
return nodesFactory(data, pathPrefix)
}
Expand Down

0 comments on commit 3ca5e73

Please sign in to comment.