Skip to content

Commit

Permalink
add default args to containers
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddenton committed Feb 6, 2024
1 parent 6e0b821 commit 19e5587
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import java.math.BigInteger
/**
* Jackson JsonNode-based implementation of the DataContainer
*/
open class JsonNodeDataContainer(input: JsonNode) :
open class JsonNodeDataContainer(input: JsonNode = instance.objectNode()) :
DataContainer<JsonNode>(
input,
{ content, it -> content.has(it) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dev.forkhandles.data
/**
* Map-based implementation of the DataContainer
*/
open class MapDataContainer(input: Map<String, Any?>) :
open class MapDataContainer(input: Map<String, Any?> = emptyMap()) :
DataContainer<MutableMap<String, Any?>>(input.toMutableMap(), { content, it -> content.containsKey(it) },
{ content, it -> content[it] },
{ map, name, value -> map[name] = value }
Expand Down

0 comments on commit 19e5587

Please sign in to comment.