/*
 * This file is part of Nucleus, licensed under the MIT License (MIT). See the LICENSE.txt file
 * at the root of this project for more details.
 */
package io.github.nucleuspowered.nucleus.core.module;

import com.google.inject.Injector;

public class ModuleContainer {

    private final String id;
    private final String name;
    private final boolean isRequired;
    private final Class<? extends IModule> moduleClass;

    public ModuleContainer(
            final String id,
            final String name,
            final boolean isRequired,
            final Class<? extends IModule> moduleClass) {
        this.id = id;
        this.name = name;
        this.isRequired = isRequired;
        this.moduleClass = moduleClass;
    }

    public String getId() {
        return this.id;
    }

    public String getName() {
        return this.name;
    }

    public boolean isRequired() {
        return this.isRequired;
    }

    public Class<? extends IModule> getModuleClass() {
        return this.moduleClass;
    }

    public IModule construct(final Injector injector) {
        return injector.getInstance(this.moduleClass);
    }

    public static final class Configurable<T> extends ModuleContainer {

        private final Class<T> configurationClass;

        public Configurable(
                final String id,
                final String name,
                final boolean isRequired,
                final Class<? extends IModule> moduleClass,
                final Class<T> configurationClass) {
            super(id, name, isRequired, moduleClass);
            this.configurationClass = configurationClass;
        }

        public Class<T> getConfigurationClass() {
            return this.configurationClass;
        }
    }

}

@@ -239,37 +239,118 @@
 or;%0A
-%0Apublic class ModuleContainer
+import org.jetbrains.annotations.NotNull;%0A%0Apublic class ModuleContainer implements Comparable%3CModuleContainer%3E
  %7B%0A%0A
@@ -1221,32 +1221,148 @@
 eClass);%0A    %7D%0A%0A
+    @Override%0A    public int compareTo(@NotNull ModuleContainer o) %7B%0A        return this.id.compareTo(o.id);%0A    %7D%0A%0A
     public stati

Implement Comparable on ModuleContainer