Skip to content
Snippets Groups Projects
Commit 3af86a10 authored by Matej Kovár's avatar Matej Kovár
Browse files

added javadocs

parent 1747c132
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment