// Path: src/main/java/org/fest/util/Arrays.java
// public static boolean isArray(@Nullable Object o) {
//   return o != null && o.getClass().isArray();
// }
// 
// Path: src/main/java/org/fest/util/Preconditions.java
// public static @NotNull <T> T checkNotNull(@Nullable T reference) {
//   if (reference == null) {
//     throw new NullPointerException();
//   }
//   return reference;
// }
// 
// Path: src/main/java/org/fest/util/Strings.java
// public static @Nullable String quote(@Nullable String s) {
//   return s != null ? String.format("'%s'", s) : null;
// }


import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.io.File;
import java.util.*;
import static org.fest.util.Arrays.isArray;
import static org.fest.util.Preconditions.checkNotNull;
import static org.fest.util.Strings.quote;
    }
    if (o instanceof Collection<?>) {
      return toStringOf((Collection<?>) o);
    }
    if (o instanceof Date) {
      return toStringOf(o);
    }
    if (o instanceof Float) {
      return toStringOf((Float) o);
    }
    if (o instanceof Long) {
      return toStringOf((Long) o);
    }
    if (o instanceof File) {
      return toStringOf((File) o);
    }
    if (o instanceof Map<?, ?>) {
      return toStringOf((Map<?, ?>) o);
    }
    if (o instanceof String) {
      return quote((String) o);
    }
    if (o instanceof Comparator) {
      return toStringOf((Comparator<?>) o);
    }
    return o == null ? null : o.toString();
  }

  private static @NotNull String toStringOf(@NotNull Comparator<?> comparator) {
    String typeName = comparator.getClass().getSimpleName();
// Path: src/main/java/org/fest/util/Arrays.java
// public static boolean isArray(@Nullable Object o) {
//   return o != null && o.getClass().isArray();
// }
// 
// Path: src/main/java/org/fest/util/Preconditions.java
// public static @NotNull <T> T checkNotNull(@Nullable T reference) {
//   if (reference == null) {
//     throw new NullPointerException();
//   }
//   return reference;
// }
// 
// Path: src/main/java/org/fest/util/Strings.java
// public static @Nullable String quote(@Nullable String s) {
//   return s != null ? String.format("'%s'", s) : null;
// }


// Path: src/main/java/org/fest/util/ToString.java
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.io.File;
import java.util.*;
import static org.fest.util.Arrays.isArray;
import static org.fest.util.Preconditions.checkNotNull;
import static org.fest.util.Strings.quote;

    }
    if (o instanceof Collection<?>) {
      return toStringOf((Collection<?>) o);
    }
    if (o instanceof Date) {
      return toStringOf(o);
    }
    if (o instanceof Float) {
      return toStringOf((Float) o);
    }
    if (o instanceof Long) {
      return toStringOf((Long) o);
    }
    if (o instanceof File) {
      return toStringOf((File) o);
    }
    if (o instanceof Map<?, ?>) {
      return toStringOf((Map<?, ?>) o);
    }
    if (o instanceof String) {
      return quote((String) o);
    }
    if (o instanceof Comparator) {
      return toStringOf((Comparator<?>) o);
    }
    return o == null ? null : o.toString();
  }

  private static @NotNull String toStringOf(@NotNull Comparator<?> comparator) {
    String typeName = comparator.getClass().getSimpleName();
    String toString = quote(!typeName.isEmpty() ? typeName : "Anonymous Comparator class");