From 49eddb60991fb916c747c74f738128cb17ea1d84 Mon Sep 17 00:00:00 2001 From: SIMAILA Djalim Date: Wed, 14 Dec 2022 14:35:10 +0100 Subject: [PATCH] finished documentation for class SearchedPackage --- .../packageviewer/pack/SearchedPackage.java | 54 ++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/src/main/java/fr/packageviewer/pack/SearchedPackage.java b/src/main/java/fr/packageviewer/pack/SearchedPackage.java index 868801e..5ede26f 100644 --- a/src/main/java/fr/packageviewer/pack/SearchedPackage.java +++ b/src/main/java/fr/packageviewer/pack/SearchedPackage.java @@ -1,27 +1,74 @@ package fr.packageviewer.pack; +/** + * The SearchedPackage class stores metadata found when searching for a + * package. + * + * @author C.Marla, R.Thomas, S.Djalim + * @version 1.0 + */ public class SearchedPackage { + /** + * Name of the package + */ private final String name; + /** + * Version of the package + */ private final String version; + /** + * Repository where the package is located + */ private final String repo; + /** + * Description of the package + */ private final String description; + /** + * Getter for the name attribute + * + * @return String, the name of the package + */ public String getName() { return name; } + /** + * Getter for the version attribute + * + * @return String, the version of the package + */ public String getVersion() { return version; } + /** + * Getter for the repo attribute + * + * @return String, repository where the package is located + */ public String getRepo() { return repo; } + /** + * Getter for the description attribute + * + * @return String, Description of the package + */ public String getDescription() { return description; } - + /** + * Constructor for the SearchedPackage class + * + * @param name String, name of the package + * @param version String, version of the package + * @param repo String, repository where the package is located + * @param description String, description of the package + * + */ public SearchedPackage(String name, String version, String repo, String desciption) { this.name = name; this.version = version; @@ -29,6 +76,11 @@ public class SearchedPackage { this.description = desciption; } + /** + * Returns a string reprensentation of the package + * + * @return String, Description of the package + */ @Override public String toString() { return "SearchedPackage{name=%s,version=%s,repo=%s,description=%s}".formatted(name, version, repo, description);