@Test public void testChecklistKeyComparator() { final Checklist.JsonKeys keys = Checklist.keys(); final String[] inputValues1 = keys.orderedKeys().toArray(new String[0]); Arrays.sort(inputValues1, Checklist.checklistKeyComparator.reversed()); Arrays.sort(inputValues1, Checklist.checklistKeyComparator); assertArrayEquals("sort reverse sort should be stable", keys.orderedKeys().toArray(new String[0]), inputValues1); final String[] inputValues2 = new String[]{"foo", keys.name()}; final String[] expectValues2 = new String[]{keys.name(), "foo"}; Arrays.sort(inputValues2, Checklist.checklistKeyComparator); assertArrayEquals("sort unknown keys after known keys", expectValues2, inputValues2); final String[] inputValues2b = new String[]{keys.name(), "foo"}; final String[] expectValues2b = new String[]{keys.name(), "foo"}; Arrays.sort(inputValues2b, Checklist.checklistKeyComparator); assertArrayEquals("sort unknown keys after known keys", expectValues2b, inputValues2b); final String[] inputValues3 = new String[]{"b", "a"}; final String[] expectValues3 = new String[]{"a", "b"}; Arrays.sort(inputValues3, Checklist.checklistKeyComparator); assertArrayEquals("sort unknown keys using String.compareTo", expectValues3, inputValues3); }
@NotNull public static Checklist.JsonKeys keys() { return KEYS; }
Checklist implements JsonObjectConvertible { @NotNull public static Checklist.JsonKeys keys() { return KEYS; } }
Checklist implements JsonObjectConvertible { @NotNull public static Checklist.JsonKeys keys() { return KEYS; } Checklist(final @Nullable JsonObject originalJson,
              final @Nullable String moduleName,
              final @Nullable String name,
              final @NotNull List<URL> cndUrls,
              final @NotNull List<JcrNs> jcrNamespaces,
              final @NotNull List<QNodeTypeDefinition> jcrNodetypes,
              final @NotNull List<PrivilegeDefinition> jcrPrivileges,
              final @NotNull List<ForcedRoot> forcedRoots,
              final @NotNull List<CheckSpec.ImmutableSpec> checks,
              final @NotNull List<String> repoInits); }
Checklist implements JsonObjectConvertible { @NotNull public static Checklist.JsonKeys keys() { return KEYS; } Checklist(final @Nullable JsonObject originalJson,
              final @Nullable String moduleName,
              final @Nullable String name,
              final @NotNull List<URL> cndUrls,
              final @NotNull List<JcrNs> jcrNamespaces,
              final @NotNull List<QNodeTypeDefinition> jcrNodetypes,
              final @NotNull List<PrivilegeDefinition> jcrPrivileges,
              final @NotNull List<ForcedRoot> forcedRoots,
              final @NotNull List<CheckSpec.ImmutableSpec> checks,
              final @NotNull List<String> repoInits); @NotNull static Checklist.JsonKeys keys(); static Comparator<T> comparingJsonKeys(final @NotNull Function<T, String> jsonKeyExtractor); String getModuleName(); String getName(); List<URL> getCndUrls(); List<QNodeTypeDefinition> getJcrNodetypes(); List<JcrNs> getJcrNamespaces(); List<String> getJcrPrivilegeNames(); List<PrivilegeDefinition> getJcrPrivileges(); List<ForcedRoot> getForcedRoots(); List<CheckSpec> getChecks(); List<String> getRepoInits(); InitStage asInitStage(); @Override String toString(); @Override JsonObject toJson(); static Checklist fromJson(final @NotNull String moduleName,
                                     final @Nullable URL manifestUrl,
                                     final @NotNull JsonObject json); }
Checklist implements JsonObjectConvertible { @NotNull public static Checklist.JsonKeys keys() { return KEYS; } Checklist(final @Nullable JsonObject originalJson,
              final @Nullable String moduleName,
              final @Nullable String name,
              final @NotNull List<URL> cndUrls,
              final @NotNull List<JcrNs> jcrNamespaces,
              final @NotNull List<QNodeTypeDefinition> jcrNodetypes,
              final @NotNull List<PrivilegeDefinition> jcrPrivileges,
              final @NotNull List<ForcedRoot> forcedRoots,
              final @NotNull List<CheckSpec.ImmutableSpec> checks,
              final @NotNull List<String> repoInits); @NotNull static Checklist.JsonKeys keys(); static Comparator<T> comparingJsonKeys(final @NotNull Function<T, String> jsonKeyExtractor); String getModuleName(); String getName(); List<URL> getCndUrls(); List<QNodeTypeDefinition> getJcrNodetypes(); List<JcrNs> getJcrNamespaces(); List<String> getJcrPrivilegeNames(); List<PrivilegeDefinition> getJcrPrivileges(); List<ForcedRoot> getForcedRoots(); List<CheckSpec> getChecks(); List<String> getRepoInits(); InitStage asInitStage(); @Override String toString(); @Override JsonObject toJson(); static Checklist fromJson(final @NotNull String moduleName,
                                     final @Nullable URL manifestUrl,
                                     final @NotNull JsonObject json);  }