// Path: src/main/java/io/arivera/oss/embedded/rabbitmq/util/ArchiveType.java
// public enum ArchiveType {
// 
//   TAR_GZ, TAR_XZ, ZIP;
// 
//   public String getExtension() {
//     return name().toLowerCase(Locale.US).replace("_", ".");
//   }
// 
//   public boolean matches(String filesname) {
//     return filesname.endsWith(getExtension());
//   }
// }
// 
// Path: src/main/java/io/arivera/oss/embedded/rabbitmq/util/OperatingSystem.java
// public enum OperatingSystem {
// 
//   WINDOWS, MAC_OS, UNIX;
// 
//   /**
//    * Returns the right instance of the Operation System.
//    *
//    * @see SystemUtils#IS_OS_MAC
//    * @see SystemUtils#IS_OS_WINDOWS
//    */
//   public static OperatingSystem detect() {
//     if (SystemUtils.IS_OS_MAC) {
//       return MAC_OS;
//     } else if (SystemUtils.IS_OS_WINDOWS) {
//       return WINDOWS;
//     } else {
//       return UNIX;
//     }
//   }
// 
// }
// 
// Path: src/main/java/io/arivera/oss/embedded/rabbitmq/util/StringUtils.java
// public class StringUtils {
// 
//   /**
//    * Joins the elements of the provided collection into a single String containing the provided list of elements.
//    * <p>
//    * No delimiter is added before or after the list.
//    * <p>
//    * Empty collections return an empty String.
//    */
//   public static <T> String join(Collection<T> collection, CharSequence joinedBy) {
//     if (collection.isEmpty()) {
//       return "";
//     }
//     StringBuilder stringBuilder = new StringBuilder(256);
//     for (T t : collection) {
//       stringBuilder.append(t.toString()).append(joinedBy);
//     }
//     return stringBuilder.substring(0, stringBuilder.length() - joinedBy.length());
//   }
// 
// }


import io.arivera.oss.embedded.rabbitmq.util.ArchiveType;
import io.arivera.oss.embedded.rabbitmq.util.OperatingSystem;
import io.arivera.oss.embedded.rabbitmq.util.StringUtils;
import java.util.ArrayList;
import java.util.List;
   *                         or @{code null} if no version check should be performed.
   * @param unixArchiveType The type of packaging used for the Unix/Mac binaries, typically {@link ArchiveType#TAR_XZ}
   * @param windowsArchiveType The type of packaging used for Windows binaries, typically {@link ArchiveType#ZIP}
   *
   * @see <a href="https://www.rabbitmq.com/which-erlang.html">RabbitMQ Erlang Version Requirements</a>
   */
  public BaseVersion(String semanticVersion, String minErlangVersion,
                     ArchiveType unixArchiveType, ArchiveType windowsArchiveType) {
    String[] versionComponents = semanticVersion.split("\\.");
    this.versionComponents = new ArrayList<>(versionComponents.length);
    for (String versionComponent : versionComponents) {
      this.versionComponents.add(Integer.parseInt(versionComponent));
    }
    this.unixArchiveType = unixArchiveType;
    this.windowsArchiveType = windowsArchiveType;
    this.minErlangVersion = minErlangVersion;
  }

  @Override
  public List<Integer> getVersionComponents() {
    return versionComponents;
  }

  @Override
  public String getVersionAsString() {
    return getVersionAsString(".");
  }

  @Override
  public String getVersionAsString(CharSequence separator) {
// Path: src/main/java/io/arivera/oss/embedded/rabbitmq/util/ArchiveType.java
// public enum ArchiveType {
// 
//   TAR_GZ, TAR_XZ, ZIP;
// 
//   public String getExtension() {
//     return name().toLowerCase(Locale.US).replace("_", ".");
//   }
// 
//   public boolean matches(String filesname) {
//     return filesname.endsWith(getExtension());
//   }
// }
// 
// Path: src/main/java/io/arivera/oss/embedded/rabbitmq/util/OperatingSystem.java
// public enum OperatingSystem {
// 
//   WINDOWS, MAC_OS, UNIX;
// 
//   /**
//    * Returns the right instance of the Operation System.
//    *
//    * @see SystemUtils#IS_OS_MAC
//    * @see SystemUtils#IS_OS_WINDOWS
//    */
//   public static OperatingSystem detect() {
//     if (SystemUtils.IS_OS_MAC) {
//       return MAC_OS;
//     } else if (SystemUtils.IS_OS_WINDOWS) {
//       return WINDOWS;
//     } else {
//       return UNIX;
//     }
//   }
// 
// }
// 
// Path: src/main/java/io/arivera/oss/embedded/rabbitmq/util/StringUtils.java
// public class StringUtils {
// 
//   /**
//    * Joins the elements of the provided collection into a single String containing the provided list of elements.
//    * <p>
//    * No delimiter is added before or after the list.
//    * <p>
//    * Empty collections return an empty String.
//    */
//   public static <T> String join(Collection<T> collection, CharSequence joinedBy) {
//     if (collection.isEmpty()) {
//       return "";
//     }
//     StringBuilder stringBuilder = new StringBuilder(256);
//     for (T t : collection) {
//       stringBuilder.append(t.toString()).append(joinedBy);
//     }
//     return stringBuilder.substring(0, stringBuilder.length() - joinedBy.length());
//   }
// 
// }


// Path: src/main/java/io/arivera/oss/embedded/rabbitmq/BaseVersion.java
import io.arivera.oss.embedded.rabbitmq.util.ArchiveType;
import io.arivera.oss.embedded.rabbitmq.util.OperatingSystem;
import io.arivera.oss.embedded.rabbitmq.util.StringUtils;
import java.util.ArrayList;
import java.util.List;

   *                         or @{code null} if no version check should be performed.
   * @param unixArchiveType The type of packaging used for the Unix/Mac binaries, typically {@link ArchiveType#TAR_XZ}
   * @param windowsArchiveType The type of packaging used for Windows binaries, typically {@link ArchiveType#ZIP}
   *
   * @see <a href="https://www.rabbitmq.com/which-erlang.html">RabbitMQ Erlang Version Requirements</a>
   */
  public BaseVersion(String semanticVersion, String minErlangVersion,
                     ArchiveType unixArchiveType, ArchiveType windowsArchiveType) {
    String[] versionComponents = semanticVersion.split("\\.");
    this.versionComponents = new ArrayList<>(versionComponents.length);
    for (String versionComponent : versionComponents) {
      this.versionComponents.add(Integer.parseInt(versionComponent));
    }
    this.unixArchiveType = unixArchiveType;
    this.windowsArchiveType = windowsArchiveType;
    this.minErlangVersion = minErlangVersion;
  }

  @Override
  public List<Integer> getVersionComponents() {
    return versionComponents;
  }

  @Override
  public String getVersionAsString() {
    return getVersionAsString(".");
  }

  @Override
  public String getVersionAsString(CharSequence separator) {
    return StringUtils.join(versionComponents, separator);