diff --git a/Comparison/src/main/java/cz/fidentis/analyst/Project.java b/Comparison/src/main/java/cz/fidentis/analyst/Project.java index 8b53ffeca134d2016e0fc5468ae15f2f3f9e25c9..892f547af7e8752b7825528cd31fdffe3401eb09 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 */ }