All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.clickzetta.platform.test.ClassUtil Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package com.clickzetta.platform.test;

import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;

public class ClassUtil {

  public static List getListClassName(List list) {
    return getListClassName(list, true);
  }

  public static List getListClassName(List list, boolean simpleName) {
    return list.stream().map((Function) o -> {
      if (simpleName) {
        return o.getClass().getSimpleName();
      } else {
        return o.getClass().getCanonicalName();
      }
    }).collect(Collectors.toList());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy