public UniVertex(Map<String, Object> keyValues, ElementSchema schema, UniGraph graph) {
super(keyValues, schema, graph);
this.properties = new ConcurrentHashMap<>();
keyValues.forEach((key, value) -> {
List<VertexProperty> props;
if (value instanceof Collection){
props = ((Collection<Object>) value).stream().map(v -> new UniVertexProperty<>(this, key, v)).collect(Collectors.toList());
}
else{
props = new ArrayList<>();
props.add(new UniVertexProperty<>(this, key, value));
}
properties.put(key, props);
});
}