Skip to content
Snippets Groups Projects
Commit 7c1b6af4 authored by matko's avatar matko
Browse files

added simple functions for secondaryFaces modifying

parent e70bde95
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,8 @@ import cz.fidentis.analyst.face.HumanFace; ...@@ -9,6 +9,8 @@ import cz.fidentis.analyst.face.HumanFace;
import java.util.ArrayList; import java.util.ArrayList;
/** /**
* This class encapsulates data for creating project with primary face and
* secondary faces comparison.
* *
* @author Matej Kovar * @author Matej Kovar
*/ */
...@@ -35,4 +37,24 @@ public class Project { ...@@ -35,4 +37,24 @@ public class Project {
this.secondaryFaces = secondaryFaces; this.secondaryFaces = secondaryFaces;
} }
public void addSecondaryFace(HumanFace face) {
this.secondaryFaces.add(face);
}
public void removeSecondaryFace(HumanFace face) {
for (int i = 0; i < secondaryFaces.size(); i++) {
if (secondaryFaces.get(i) == face) {
secondaryFaces.remove(i);
}
}
}
public void removeSelected(ArrayList<HumanFace> faces) {
for (int i = 0; i < faces.size(); i++) {
this.removeSecondaryFace(faces.get(i));
}
}
//TODO implements comparable and create comparators
} }
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