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

org.hisrc.jsonix.definition.Module Maven / Gradle / Ivy

There is a newer version: 2.3.9
Show newest version
package org.hisrc.jsonix.definition;

import java.text.MessageFormat;
import java.util.List;

import org.apache.commons.lang3.Validate;

public class Module {

	private final String name;
	private final List> mappings;
	private final List outputs;

	public Module(String name, List> mappings,
			List outputs) {
		Validate.notNull(name);
		Validate.noNullElements(mappings);
		Validate.noNullElements(outputs);
		this.name = name;
		this.mappings = mappings;
		this.outputs = outputs;
	}

	public boolean isEmpty() {
		for (Mapping mapping : getMappings()) {
			if (!mapping.isEmpty()) {
				return false;
			}
		}
		return true;
	}

	public String getName() {
		return name;
	}

	public List> getMappings() {
		return mappings;
	}

	public List getOutputs() {
		return outputs;
	}

	@Override
	public String toString() {
		return MessageFormat.format("Module [{0}].", this.name);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy