private static String of(Map... maps) { StringBuilder sb = new StringBuilder(); for (Map map : maps) { appendMap(sb, map); } return DigestUtils.sha256Hex(sb.toString()); }
private static void appendIndexType(StringBuilder sb, IndexDefinition.Type type) { appendMap(sb, type.getAttributes()); }
private static void appendObject(StringBuilder sb, Object value) { if (value instanceof IndexDefinition.Type) { appendIndexType(sb, (IndexDefinition.Type) value); } else if (value instanceof Map) { appendMap(sb, (Map) value); } else if (value instanceof Iterable) { appendIterable(sb, (Iterable) value); } else { sb.append(String.valueOf(value)); } }
private static String of(Map... maps) { StringBuilder sb = new StringBuilder(); for (Map map : maps) { appendMap(sb, map); } return DigestUtils.sha256Hex(sb.toString()); }
private static void appendIndexType(StringBuilder sb, IndexDefinitions.IndexType type) { appendMap(sb, type.getAttributes()); }
private static void appendObject(StringBuilder sb, Object value) { if (value instanceof IndexDefinitions.IndexType) { appendIndexType(sb, (IndexDefinitions.IndexType) value); } else if (value instanceof Map) { appendMap(sb, (Map) value); } else if (value instanceof Iterable) { appendIterable(sb, (Iterable) value); } else { sb.append(String.valueOf(value)); } }