package fr.lille1.maven_data_extraction.core;

import java.io.File;

/**
 * Implementation of a version for a {@link Project} object.
 * 
 * @author Alexandre Bonhomme
 * 
 */
public class Version {

	private final String versionNumber;
	private final File pomFile;

	/**
	 * @param version
	 * @param pom
	 */
	public Version(String version, File pom) {
		this.versionNumber = version;
		this.pomFile = pom;
	}

	public String getVersionNumber() {
		return versionNumber;
	}

	public File getPomFile() {
		return pomFile;
	}

	@Override
	public boolean equals(Object obj) {
		Version version = (Version) obj;

		if (version == null) {
			return false;
		}

		if (!version.getVersionNumber().equals(versionNumber)) {
			return false;
		}

		if (!version.getPomFile().equals(pomFile)) {
			return false;
		}

		return true;
	}

}

@@ -60,16 +60,67 @@
 io.File;
+%0Aimport java.util.ArrayList;%0Aimport java.util.List;
 %0A%0A/**%0A *
@@ -309,16 +309,62 @@
 pomFile;
+%0A%09private final List%3CProject%3E listDependents; 
 %0A%0A%09/**%0A%09
@@ -499,16 +499,66 @@
  = pom;%0A
+%09%09this.listDependents = new ArrayList%3CProject%3E();%0A
 %09%7D%0A%0A%09pub
@@ -963,14 +963,87 @@
 n true;%0A
-
 %09%7D%0A%0A
+%09public List%3CProject%3E getDependents() %7B%0A%09%09return listDependents;%0A%09%7D%0A%09%0A%09%0A%0A
 %7D%0A

Add dependents to Version