From 3af86a102e9fae01879d3ab38ec25056bcd0ef50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Kov=C3=A1r?= <matko@192.168.1.105> Date: Wed, 14 Apr 2021 00:32:06 +0200 Subject: [PATCH] added javadocs --- .../java/cz/fidentis/analyst/Project.java | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/Comparison/src/main/java/cz/fidentis/analyst/Project.java b/Comparison/src/main/java/cz/fidentis/analyst/Project.java index 8b53ffec..892f547a 100644 --- a/Comparison/src/main/java/cz/fidentis/analyst/Project.java +++ b/Comparison/src/main/java/cz/fidentis/analyst/Project.java @@ -16,27 +16,52 @@ public class Project { private HumanFace primaryFace; private List<HumanFace> secondaryFaces = new ArrayList<>(); + /** + * Returns primary face + * @return primary face + */ public HumanFace getPrimaryFace() { return primaryFace; } + /** + * Sets new primary face + * @param primaryFace which will be new primary face + */ public void setPrimaryFace(HumanFace primaryFace) { this.primaryFace = primaryFace; } + /** + * returns list of HumanFace secondary faces + * @return list of secondary faces in project + */ public List<HumanFace> getSecondaryFaces() { return Collections.unmodifiableList(secondaryFaces); } + /** + * Sets new list of secondary faces + * @param secondaryFaces list of HumanFace which will be new list of + * secondary faces + */ public void setSecondaryFaces(List<HumanFace> secondaryFaces) { this.secondaryFaces.clear(); this.secondaryFaces.addAll(secondaryFaces); } + /** + * Adds new face to secondaryFaces + * @param face HumanFace which will be added to list of secondary faces + */ public void addSecondaryFace(HumanFace face) { this.secondaryFaces.add(face); } + /** + * Removes HumanFace from secondaryFaces + * @param face HumanFace which will be removed from secondaryFaces + */ public void removeSecondaryFace(HumanFace face) { for (int i = 0; i < secondaryFaces.size(); i++) { if (secondaryFaces.get(i).equals(face)) { @@ -45,11 +70,19 @@ public class Project { } } + /** + * Removes faces which are sent to this function by list of HumanFace + * from secondaryFaces + * + * @param faces List of HumanFace faces which should be removed from + * secondaryFaces + */ public void removeSelected(List<HumanFace> faces) { for (int i = 0; i < faces.size(); i++) { this.removeSecondaryFace(faces.get(i)); } } - //TODO implements comparable and create comparators + /* TODO implement comparable and create comparators for filtering + secondaryFaces */ } -- GitLab