Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sinister Zeta Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Sinister Zeta
Sinister Zeta Project
Merge requests
!34
Test gitignore
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Test gitignore
test-gitignore
into
master
Overview
0
Commits
9
Pipelines
0
Changes
1
Closed
Nikola Babic (nab701)
requested to merge
test-gitignore
into
master
4 years ago
Overview
0
Commits
9
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Viewing commit
489e71f7
Prev
Next
Show latest version
1 file
+
20
−
21
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
489e71f7
Fixed combine not referencing itself
· 489e71f7
NikolaBabic
authored
4 years ago
src/model/Modifier.java
+
20
−
21
Options
@@ -23,52 +23,51 @@ public enum Modifier {
}
/**
* Outputs the combined values of two different given modifiers.
*
* @return The combined values of the given modifiers.
* Outputs the combined values of this and another modifier.
* @return The combined values of the modifiers.
* 0 if there are duplicate modifiers.
*/
public
int
combine
(
Modifier
m1
,
Modifier
m2
)
{
if
(
m1
==
m2
)
public
int
combine
(
Modifier
m1
)
{
if
(
m1
==
this
)
return
0
;
else
return
m1
.
val
()
+
m2
.
val
();
return
m1
.
val
()
+
this
.
val
();
}
/**
* Outputs the combined values of th
e three different
given modifiers.
* @return The combined values of the
given
modifiers.
* Outputs the combined values of th
is and two other
given modifiers.
* @return The combined values of the modifiers.
* 0 if there are duplicate modifiers.
*/
public
int
combine
(
Modifier
m1
,
Modifier
m2
,
Modifier
m3
)
{
if
(
m1
==
m
2
||
m1
==
m
3
||
m
2
==
m
3
)
public
int
combine
(
Modifier
m1
,
Modifier
m2
)
{
if
(
this
==
m
1
||
this
==
m
2
||
m
1
==
m
2
)
return
0
;
else
return
m1
.
val
()
+
m2
.
val
()
+
m3
.
val
()
;
return
this
.
val
()
+
m1
.
val
()
+
m2
.
val
();
}
/**
* Outputs the combined values of th
e four
different given modifiers.
* @return The combined values of the
given
modifiers.
* Outputs the combined values of th
is and three
different given modifiers.
* @return The combined values of the modifiers.
* 0 if there are duplicate modifiers.
*/
public
int
combine
(
Modifier
m1
,
Modifier
m2
,
Modifier
m3
,
Modifier
m4
)
{
if
(
m1
==
m
2
||
m1
==
m
3
||
m1
==
m
4
||
m
2
==
m
3
||
m
2
==
m
4
||
m
3
==
m
4
)
public
int
combine
(
Modifier
m1
,
Modifier
m2
,
Modifier
m3
)
{
if
(
this
==
m
1
||
this
==
m
2
||
this
==
m
3
||
m
1
==
m
2
||
m
1
==
m
3
||
m
2
==
m
3
)
return
0
;
else
return
m1
.
val
()
+
m2
.
val
()
+
m3
.
val
()
+
m4
.
val
()
;
return
this
.
val
()
+
m1
.
val
()
+
m2
.
val
()
+
m3
.
val
();
}
/**
* Outputs the combined values of the
five
different given modifiers.
* Outputs the combined values of the
this and four
different given modifiers.
* @return The combined values of the given modifiers.
* 0 if there are duplicate modifiers.
*/
public
int
combine
(
Modifier
m1
,
Modifier
m2
,
Modifier
m3
,
Modifier
m4
,
Modifier
m5
)
{
if
(
m1
==
m
2
||
m1
==
m
3
||
m1
==
m
4
||
m1
==
m
5
||
m
2
==
m
3
||
m
2
==
m
4
||
m2
==
m
5
||
m
3
==
m4
||
m
4
==
m
5
)
public
int
combine
(
Modifier
m1
,
Modifier
m2
,
Modifier
m3
,
Modifier
m4
)
{
if
(
this
==
m
1
||
this
==
m
2
||
this
==
m
3
||
this
==
m
4
||
m
1
==
m
2
||
m
1
==
m
3
||
m1
==
m4
||
m2
==
m
3
||
m
2
==
m4
||
m
3
==
m
4
)
return
0
;
else
return
m1
.
val
()
+
m2
.
val
()
+
m3
.
val
()
+
m4
.
val
()
+
m4
.
val
();
return
this
.
val
()
+
m1
.
val
()
+
m2
.
val
()
+
m3
.
val
()
+
m4
.
val
();
}
}
Loading