diff --git a/polydata-model/src/main/java/com/unidev/polydata4/domain/BasicPoly.java b/polydata-model/src/main/java/com/unidev/polydata4/domain/BasicPoly.java index 4e364c9..7970814 100644 --- a/polydata-model/src/main/java/com/unidev/polydata4/domain/BasicPoly.java +++ b/polydata-model/src/main/java/com/unidev/polydata4/domain/BasicPoly.java @@ -24,6 +24,11 @@ public class BasicPoly implements Poly, Serializable { @Setter protected Map metadata; + public BasicPoly(Map data) { + this.data = data; + this.metadata = new ConcurrentHashMap<>(); + } + public BasicPoly(Map data, Map metadata) { this.data = data; this.metadata = metadata; diff --git a/polydata-model/src/main/java/com/unidev/polydata4/domain/BasicPolyList.java b/polydata-model/src/main/java/com/unidev/polydata4/domain/BasicPolyList.java index cf254b8..2f97957 100644 --- a/polydata-model/src/main/java/com/unidev/polydata4/domain/BasicPolyList.java +++ b/polydata-model/src/main/java/com/unidev/polydata4/domain/BasicPolyList.java @@ -26,17 +26,21 @@ public class BasicPolyList implements PolyList, Serializable { @Setter protected Map metadata; - public BasicPolyList(Map metadata, List list) { + public BasicPolyList(List list) { + this(list, new ConcurrentHashMap<>()); + } + + public BasicPolyList(List list, Map metadata) { this.list = list; this.metadata = metadata; } public BasicPolyList() { - this(new ConcurrentHashMap<>(), new CopyOnWriteArrayList<>()); + this(new CopyOnWriteArrayList<>(), new ConcurrentHashMap<>()); } public BasicPolyList(Collection source) { - this(new ConcurrentHashMap<>(), new CopyOnWriteArrayList<>(source)); + this(new CopyOnWriteArrayList<>(source), new ConcurrentHashMap<>()); } public static BasicPolyList newList() { diff --git a/polydata-model/src/main/java/com/unidev/polydata4/domain/BasicPolyMap.java b/polydata-model/src/main/java/com/unidev/polydata4/domain/BasicPolyMap.java index a0ce6b8..3716282 100644 --- a/polydata-model/src/main/java/com/unidev/polydata4/domain/BasicPolyMap.java +++ b/polydata-model/src/main/java/com/unidev/polydata4/domain/BasicPolyMap.java @@ -22,6 +22,12 @@ public class BasicPolyMap implements PolyMap, Serializable { @Setter private Map metadata; + + public BasicPolyMap(Map map, Map metadata) { + this.map = map; + this.metadata = metadata; + } + public BasicPolyMap() { super(); map = new ConcurrentHashMap<>();