diff --git a/src/main/java/fr/packageviewer/Pair.java b/src/main/java/fr/packageviewer/Pair.java index 625e133..75db71f 100644 --- a/src/main/java/fr/packageviewer/Pair.java +++ b/src/main/java/fr/packageviewer/Pair.java @@ -3,52 +3,72 @@ package fr.packageviewer; /** * The Pair class stores two objects of distinct type * - * @author C.Marla, R.Thomas, S.Djalim + * @author R.Thomas * @version 1.0 */ -public class Pair { +public class Pair { private K first; private V second; + /** - * + * Empty Constructor for the Pair class */ public Pair() { } /** + * Main Constructor for the Pair class * - * @param first - * @param second + * @param first, the first object to be stored + * @param second the second object to be stored */ public Pair(K first, V second) { this.first = first; this.second = second; } + /** + * Getter for the attribute first * - * @return + * @return the object stored in the attribute first */ public K getFirst() { return first; } + /** + * Setter for the attribute first + * + * @param first Store the given object in the attribute first + */ public void setFirst(K first) { this.first = first; } - + /** + * Getter for the attribute second * - * @return + * @return the object stored in the attribute second */ public V getSecond() { return second; } + /** + * Setter for the attribute second + * + * @param second Store the given object in the attribute second + */ public void setSecond(V second) { this.second = second; } + /** + * Returns a string reprensentation of the pair + * + * @return String, string reprensentation of the pair + */ @Override public String toString() { return "Pair{key=%s,value=%s}".formatted(first, second);