Skip to content

Commit

Permalink
[NOID] spotless and licence changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vga91 committed Nov 20, 2024
1 parent 894b789 commit 23ebbe2
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions core/src/main/java/apoc/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -1313,8 +1313,10 @@ public static ConstraintCategory getConstraintCategory(ConstraintType type) {
} else {
return ConstraintCategory.NODE;
}
} public static void setProperties(Entity entity, Map<String, Object> props) {
for (var entry: props.entrySet()) {
}

public static void setProperties(Entity entity, Map<String, Object> props) {
for (var entry : props.entrySet()) {
entity.setProperty(entry.getKey(), entry.getValue());
}
}
Expand All @@ -1326,14 +1328,16 @@ public static ConstraintCategory getConstraintCategory(ConstraintType type) {
*/
public static Map<Object, List> listOfMapToMapOfLists(Map mapKeys, List<Map<String, Object>> vectors) {
Map<Object, List> additionalBodies = new HashMap();
for (var vector: vectors) {
for (var vector : vectors) {
mapKeys.forEach((from, to) -> {
mapEntryToList(additionalBodies, vector, from, to);
});
}
return additionalBodies;
}
private static void mapEntryToList(Map<Object, List> map, Map<String, Object> vector, Object keyFrom, Object keyTo) {

private static void mapEntryToList(
Map<Object, List> map, Map<String, Object> vector, Object keyFrom, Object keyTo) {
Object item = vector.get(keyFrom);
if (item == null) {
return;
Expand All @@ -1353,7 +1357,7 @@ private static void mapEntryToList(Map<Object, List> map, Map<String, Object> ve
public static float[] listOfNumbersToFloatArray(List<? extends Number> embedding) {
float[] floats = new float[embedding.size()];
int i = 0;
for (var item: embedding) {
for (var item : embedding) {
floats[i] = item.floatValue();
i++;
}
Expand Down

0 comments on commit 23ebbe2

Please sign in to comment.