Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Analyst WebApp
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fidentis
Analyst WebApp
Commits
7b65ab15
There was an error fetching the commit references. Please try again later.
Commit
7b65ab15
authored
3 years ago
by
Matej Kovár
Browse files
Options
Downloads
Patches
Plain Diff
updated attributes, added javadocs
parent
b738128e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Comparison/src/main/java/cz/fidentis/analyst/Project.java
+21
-16
21 additions, 16 deletions
Comparison/src/main/java/cz/fidentis/analyst/Project.java
with
21 additions
and
16 deletions
Comparison/src/main/java/cz/fidentis/analyst/Project.java
+
21
−
16
View file @
7b65ab15
...
...
@@ -14,7 +14,7 @@ import java.util.List;
public
class
Project
{
//private HumanFace primaryFace;
private
List
<
HumanFace
>
model
s
=
new
ArrayList
<>();
private
List
<
HumanFace
>
face
s
=
new
ArrayList
<>();
/**
...
...
@@ -53,7 +53,7 @@ public class Project {
* @return list of secondary faces
*/
public
List
<
HumanFace
>
getFaces
()
{
return
Collections
.
unmodifiableList
(
model
s
);
return
Collections
.
unmodifiableList
(
face
s
);
}
/**
...
...
@@ -64,17 +64,17 @@ public class Project {
* @throws IllegalArgumentException if one of faces from argument is null
*/
public
void
setFaces
(
List
<
HumanFace
>
secondaryFaces
)
{
this
.
model
s
.
clear
();
this
.
face
s
.
clear
();
for
(
int
i
=
0
;
i
<
secondaryFaces
.
size
();
i
++)
{
if
(
secondaryFaces
.
get
(
i
)
==
null
)
{
throw
new
IllegalArgumentException
(
"One of faces is null"
);
}
}
this
.
model
s
.
addAll
(
secondaryFaces
);
this
.
face
s
.
addAll
(
secondaryFaces
);
}
/**
* Adds new face to
model
s
* Adds new face to
face
s
*
* @param face HumanFace which will be added to list of secondary faces
* @throws IllegalArgumentException when argument face is null
...
...
@@ -83,13 +83,13 @@ public class Project {
if
(
face
==
null
)
{
throw
new
IllegalArgumentException
(
"Face is null"
);
}
this
.
model
s
.
add
(
face
);
this
.
face
s
.
add
(
face
);
}
/**
* Removes HumanFace from
model
s
* Removes HumanFace from
face
s
*
* @param face HumanFace which will be removed from
model
s
* @param face HumanFace which will be removed from
face
s
* @throws IllegalArgumentException when argument face is null
*/
public
void
removeFace
(
HumanFace
face
)
{
...
...
@@ -97,19 +97,19 @@ public class Project {
throw
new
IllegalArgumentException
(
"Face is null"
);
}
for
(
int
i
=
0
;
i
<
model
s
.
size
();
i
++)
{
if
(
model
s
.
get
(
i
).
equals
(
face
))
{
model
s
.
remove
(
i
);
for
(
int
i
=
0
;
i
<
face
s
.
size
();
i
++)
{
if
(
face
s
.
get
(
i
).
equals
(
face
))
{
face
s
.
remove
(
i
);
}
}
}
/**
* Removes faces which are sent to this function by list of HumanFace
* from
model
s
* from
face
s
*
* @param faces List of HumanFace faces which should be removed from
*
model
s
*
face
s
*/
public
void
removeSelected
(
List
<
HumanFace
>
faces
)
{
for
(
int
i
=
0
;
i
<
faces
.
size
();
i
++)
{
...
...
@@ -117,8 +117,15 @@ public class Project {
}
}
/**
*
* @param name String name of the model (face)
* @return face from this project faces, if not in project than returns
* null
*/
public
HumanFace
getFaceByName
(
String
name
)
{
for
(
HumanFace
face
:
model
s
)
{
for
(
HumanFace
face
:
face
s
)
{
if
(
face
.
getShortName
().
equals
(
name
))
{
return
face
;
}
...
...
@@ -126,6 +133,4 @@ public class Project {
return
null
;
}
/* TODO implement comparable and create comparators for filtering
models */
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment