test_class.file: dubbo-common/src/test/java/org/apache/dubbo/common/utils/CollectionUtilsTest.java
test_class.identifier: CollectionUtilsTest
test_case.body: @Test
      public void testJoinList() throws Exception {
          List<String> list = Arrays.asList();
          assertEquals("", CollectionUtils.join(list, "/"));
  
          list = Arrays.asList("x");
          assertEquals("x", CollectionUtils.join(list, "-"));
  
          list = Arrays.asList("a", "b");
          assertEquals("a/b", CollectionUtils.join(list, "/"));
      }
test_case.class_method_signature: CollectionUtilsTest.testJoinList()
test_case.full_signature: @Test public void testJoinList()
test_case.identifier: testJoinList
test_case.invocations: asList assertEquals join asList assertEquals join asList assertEquals join
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testJoinList()
focal_class.declarator: SIMPLE_NAME_COMPARATOR = new Comparator<String>() {
          @Override
          public int compare(String s1, String s2) {
              if (s1 == null && s2 == null) {
                  return 0;
              }
              if (s1 == null) {
                  return -1;
              }
              if (s2 == null) {
                  return 1;
              }
              int i1 = s1.lastIndexOf('.');
              if (i1 >= 0) {
                  s1 = s1.substring(i1 + 1);
              }
              int i2 = s2.lastIndexOf('.');
              if (i2 >= 0) {
                  s2 = s2.substring(i2 + 1);
              }
              return s1.compareToIgnoreCase(s2);
          }
      }
focal_class.modifier: private static final
focal_class.original_string: private static final Comparator<String> SIMPLE_NAME_COMPARATOR = new Comparator<String>() {
          @Override
          public int compare(String s1, String s2) {
              if (s1 == null && s2 == null) {
                  return 0;
              }
              if (s1 == null) {
                  return -1;
              }
              if (s2 == null) {
                  return 1;
              }
              int i1 = s1.lastIndexOf('.');
              if (i1 >= 0) {
                  s1 = s1.substring(i1 + 1);
              }
              int i2 = s2.lastIndexOf('.');
              if (i2 >= 0) {
                  s2 = s2.substring(i2 + 1);
              }
              return s1.compareToIgnoreCase(s2);
          }
      };
focal_class.type: Comparator<String>
focal_class.var_name: SIMPLE_NAME_COMPARATOR
focal_class.file: dubbo-common/src/main/java/org/apache/dubbo/common/utils/CollectionUtils.java
focal_class.identifier: CollectionUtils
focal_class.class_method_signature: CollectionUtils.CollectionUtils()
focal_class.full_signature: private  CollectionUtils()
focal_class.identifier: CollectionUtils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  CollectionUtils()
focal_class.class_method_signature: CollectionUtils.sort(List<T> list)
focal_class.full_signature: @SuppressWarnings({"unchecked", "rawtypes"}) public static List<T> sort(List<T> list)
focal_class.identifier: sort
focal_class.modifiers: @SuppressWarnings({"unchecked", "rawtypes"}) public static
focal_class.parameters: (List<T> list)
focal_class.return: List<T>
focal_class.signature: List<T> sort(List<T> list)
focal_class.class_method_signature: CollectionUtils.sortSimpleName(List<String> list)
focal_class.full_signature: public static List<String> sortSimpleName(List<String> list)
focal_class.identifier: sortSimpleName
focal_class.modifiers: public static
focal_class.parameters: (List<String> list)
focal_class.return: List<String>
focal_class.signature: List<String> sortSimpleName(List<String> list)
focal_class.class_method_signature: CollectionUtils.splitAll(Map<String, List<String>> list, String separator)
focal_class.full_signature: public static Map<String, Map<String, String>> splitAll(Map<String, List<String>> list, String separator)
focal_class.identifier: splitAll
focal_class.modifiers: public static
focal_class.parameters: (Map<String, List<String>> list, String separator)
focal_class.return: Map<String, Map<String, String>>
focal_class.signature: Map<String, Map<String, String>> splitAll(Map<String, List<String>> list, String separator)
focal_class.class_method_signature: CollectionUtils.joinAll(Map<String, Map<String, String>> map, String separator)
focal_class.full_signature: public static Map<String, List<String>> joinAll(Map<String, Map<String, String>> map, String separator)
focal_class.identifier: joinAll
focal_class.modifiers: public static
focal_class.parameters: (Map<String, Map<String, String>> map, String separator)
focal_class.return: Map<String, List<String>>
focal_class.signature: Map<String, List<String>> joinAll(Map<String, Map<String, String>> map, String separator)
focal_class.class_method_signature: CollectionUtils.split(List<String> list, String separator)
focal_class.full_signature: public static Map<String, String> split(List<String> list, String separator)
focal_class.identifier: split
focal_class.modifiers: public static
focal_class.parameters: (List<String> list, String separator)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> split(List<String> list, String separator)
focal_class.class_method_signature: CollectionUtils.join(Map<String, String> map, String separator)
focal_class.full_signature: public static List<String> join(Map<String, String> map, String separator)
focal_class.identifier: join
focal_class.modifiers: public static
focal_class.parameters: (Map<String, String> map, String separator)
focal_class.return: List<String>
focal_class.signature: List<String> join(Map<String, String> map, String separator)
focal_class.class_method_signature: CollectionUtils.join(List<String> list, String separator)
focal_class.full_signature: public static String join(List<String> list, String separator)
focal_class.identifier: join
focal_class.modifiers: public static
focal_class.parameters: (List<String> list, String separator)
focal_class.return: String
focal_class.signature: String join(List<String> list, String separator)
focal_class.class_method_signature: CollectionUtils.mapEquals(Map<?, ?> map1, Map<?, ?> map2)
focal_class.full_signature: public static boolean mapEquals(Map<?, ?> map1, Map<?, ?> map2)
focal_class.identifier: mapEquals
focal_class.modifiers: public static
focal_class.parameters: (Map<?, ?> map1, Map<?, ?> map2)
focal_class.return: boolean
focal_class.signature: boolean mapEquals(Map<?, ?> map1, Map<?, ?> map2)
focal_class.class_method_signature: CollectionUtils.objectEquals(Object obj1, Object obj2)
focal_class.full_signature: private static boolean objectEquals(Object obj1, Object obj2)
focal_class.identifier: objectEquals
focal_class.modifiers: private static
focal_class.parameters: (Object obj1, Object obj2)
focal_class.return: boolean
focal_class.signature: boolean objectEquals(Object obj1, Object obj2)
focal_class.class_method_signature: CollectionUtils.toStringMap(String... pairs)
focal_class.full_signature: public static Map<String, String> toStringMap(String... pairs)
focal_class.identifier: toStringMap
focal_class.modifiers: public static
focal_class.parameters: (String... pairs)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> toStringMap(String... pairs)
focal_class.class_method_signature: CollectionUtils.toMap(Object... pairs)
focal_class.full_signature: @SuppressWarnings("unchecked") public static Map<K, V> toMap(Object... pairs)
focal_class.identifier: toMap
focal_class.modifiers: @SuppressWarnings("unchecked") public static
focal_class.parameters: (Object... pairs)
focal_class.return: Map<K, V>
focal_class.signature: Map<K, V> toMap(Object... pairs)
focal_class.class_method_signature: CollectionUtils.isEmpty(Collection<?> collection)
focal_class.full_signature: public static boolean isEmpty(Collection<?> collection)
focal_class.identifier: isEmpty
focal_class.modifiers: public static
focal_class.parameters: (Collection<?> collection)
focal_class.return: boolean
focal_class.signature: boolean isEmpty(Collection<?> collection)
focal_class.class_method_signature: CollectionUtils.isNotEmpty(Collection<?> collection)
focal_class.full_signature: public static boolean isNotEmpty(Collection<?> collection)
focal_class.identifier: isNotEmpty
focal_class.modifiers: public static
focal_class.parameters: (Collection<?> collection)
focal_class.return: boolean
focal_class.signature: boolean isNotEmpty(Collection<?> collection)
focal_class.class_method_signature: CollectionUtils.isEmptyMap(Map map)
focal_class.full_signature: public static boolean isEmptyMap(Map map)
focal_class.identifier: isEmptyMap
focal_class.modifiers: public static
focal_class.parameters: (Map map)
focal_class.return: boolean
focal_class.signature: boolean isEmptyMap(Map map)
focal_class.class_method_signature: CollectionUtils.isNotEmptyMap(Map map)
focal_class.full_signature: public static boolean isNotEmptyMap(Map map)
focal_class.identifier: isNotEmptyMap
focal_class.modifiers: public static
focal_class.parameters: (Map map)
focal_class.return: boolean
focal_class.signature: boolean isNotEmptyMap(Map map)
focal_class.class_method_signature: CollectionUtils.ofSet(T... values)
focal_class.full_signature: public static Set<T> ofSet(T... values)
focal_class.identifier: ofSet
focal_class.modifiers: public static
focal_class.parameters: (T... values)
focal_class.return: Set<T>
focal_class.signature: Set<T> ofSet(T... values)
focal_class.class_method_signature: CollectionUtils.size(Collection<?> collection)
focal_class.full_signature: public static int size(Collection<?> collection)
focal_class.identifier: size
focal_class.modifiers: public static
focal_class.parameters: (Collection<?> collection)
focal_class.return: int
focal_class.signature: int size(Collection<?> collection)
focal_class.class_method_signature: CollectionUtils.equals(Collection<?> one, Collection<?> another)
focal_class.full_signature: public static boolean equals(Collection<?> one, Collection<?> another)
focal_class.identifier: equals
focal_class.modifiers: public static
focal_class.parameters: (Collection<?> one, Collection<?> another)
focal_class.return: boolean
focal_class.signature: boolean equals(Collection<?> one, Collection<?> another)
focal_class.class_method_signature: CollectionUtils.addAll(Collection<T> collection, T... values)
focal_class.full_signature: public static int addAll(Collection<T> collection, T... values)
focal_class.identifier: addAll
focal_class.modifiers: public static
focal_class.parameters: (Collection<T> collection, T... values)
focal_class.return: int
focal_class.signature: int addAll(Collection<T> collection, T... values)
focal_class.class_method_signature: CollectionUtils.first(Collection<T> values)
focal_class.full_signature: public static T first(Collection<T> values)
focal_class.identifier: first
focal_class.modifiers: public static
focal_class.parameters: (Collection<T> values)
focal_class.return: T
focal_class.signature: T first(Collection<T> values)
focal_method.body: public static List<String> join(Map<String, String> map, String separator) {
          if (map == null) {
              return null;
          }
          List<String> list = new ArrayList<>();
          if (map.size() == 0) {
              return list;
          }
          for (Map.Entry<String, String> entry : map.entrySet()) {
              String key = entry.getKey();
              String value = entry.getValue();
              if (StringUtils.isEmpty(value)) {
                  list.add(key);
              } else {
                  list.add(key + separator + value);
              }
          }
          return list;
      }
focal_method.class_method_signature: CollectionUtils.join(Map<String, String> map, String separator)
focal_method.full_signature: public static List<String> join(Map<String, String> map, String separator)
focal_method.identifier: join
focal_method.invocations: size entrySet getKey getValue isEmpty add add
focal_method.modifiers: public static
focal_method.parameters: (Map<String, String> map, String separator)
focal_method.return: List<String>
focal_method.signature: List<String> join(Map<String, String> map, String separator)