Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
b2program
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
b2program
Commits
c1d95995
Verified
Commit
c1d95995
authored
5 months ago
by
Miles Vella
Browse files
Options
Downloads
Patches
Plain Diff
fix subset of bool compile and logic errors
parent
7310cb90
No related branches found
No related tags found
1 merge request
!66
Refactor of Java BTypes
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
btypes_big_integer/src/main/java/de/hhu/stups/btypes/BSet.java
+14
-3
14 additions, 3 deletions
...s_big_integer/src/main/java/de/hhu/stups/btypes/BSet.java
btypes_primitives/src/main/java/de/hhu/stups/btypes/BSet.java
+1
-1
1 addition, 1 deletion
...es_primitives/src/main/java/de/hhu/stups/btypes/BSet.java
with
15 additions
and
4 deletions
btypes_big_integer/src/main/java/de/hhu/stups/btypes/BSet.java
+
14
−
3
View file @
c1d95995
...
@@ -337,9 +337,9 @@ public class BSet<T> implements BObject, Set<T> {
...
@@ -337,9 +337,9 @@ public class BSet<T> implements BObject, Set<T> {
return
result
;
return
result
;
}
}
public
BBoolean
subsetOf
Integer
()
{
public
BBoolean
subsetOf
Boolean
()
{
for
(
T
e
:
this
)
{
for
(
T
e
:
this
)
{
if
(
e
instanceof
B
Integer
)
{
if
(
e
instanceof
B
Boolean
)
{
return
new
BBoolean
(
true
);
return
new
BBoolean
(
true
);
}
else
{
}
else
{
return
new
BBoolean
(
false
);
return
new
BBoolean
(
false
);
...
@@ -349,7 +349,7 @@ public class BSet<T> implements BObject, Set<T> {
...
@@ -349,7 +349,7 @@ public class BSet<T> implements BObject, Set<T> {
}
}
public
BBoolean
strictSubsetOfBoolean
()
{
public
BBoolean
strictSubsetOfBoolean
()
{
return
subsetOfBoolean
();
return
new
BBoolean
(
subsetOfBoolean
()
.
booleanValue
()
&&
this
.
size
()
<
2
)
;
}
}
public
BBoolean
notSubsetOfBoolean
()
{
public
BBoolean
notSubsetOfBoolean
()
{
...
@@ -364,6 +364,17 @@ public class BSet<T> implements BObject, Set<T> {
...
@@ -364,6 +364,17 @@ public class BSet<T> implements BObject, Set<T> {
return
new
BBoolean
(
subsetOfBoolean
().
booleanValue
()
&&
this
.
size
()
<
2
);
return
new
BBoolean
(
subsetOfBoolean
().
booleanValue
()
&&
this
.
size
()
<
2
);
}
}
public
BBoolean
subsetOfInteger
()
{
for
(
T
e
:
this
)
{
if
(
e
instanceof
BInteger
)
{
return
new
BBoolean
(
true
);
}
else
{
return
new
BBoolean
(
false
);
}
}
return
new
BBoolean
(
true
);
}
public
BBoolean
strictSubsetOfInteger
()
{
public
BBoolean
strictSubsetOfInteger
()
{
return
subsetOfInteger
();
return
subsetOfInteger
();
}
}
...
...
This diff is collapsed.
Click to expand it.
btypes_primitives/src/main/java/de/hhu/stups/btypes/BSet.java
+
1
−
1
View file @
c1d95995
...
@@ -353,7 +353,7 @@ public class BSet<T> implements Set<T>, BObject {
...
@@ -353,7 +353,7 @@ public class BSet<T> implements Set<T>, BObject {
}
}
public
BBoolean
strictSubsetOfBoolean
()
{
public
BBoolean
strictSubsetOfBoolean
()
{
return
subsetOfBoolean
();
return
new
BBoolean
(
subsetOfBoolean
()
.
booleanValue
()
&&
this
.
size
()
<
2
)
;
}
}
public
BBoolean
notSubsetOfBoolean
()
{
public
BBoolean
notSubsetOfBoolean
()
{
...
...
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