-
-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bitset #1271 #1334
Bitset #1271 #1334
Conversation
return new Builder<>(fromInt, toInt); | ||
} | ||
|
||
static <T extends Enum<T>> Builder<T> withEnum(Class<T> clz) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor suggestion: instead of using abbreviations and misspellings of words (cla_zz_), could we please rename to reflect the intention, i.e. Class<T> enumClass
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for enums :)
final Function1<Integer, T> fromInt; | ||
final Function1<T, Integer> toInt; | ||
|
||
Builder(Function1<Integer, T> fromInt, Function1<T, Integer> toInt) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dito
Nice work so far! |
Hi guys, thanks for comments, I need one or two days to answer/reject/fix them 😄 |
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private final java.util.Map<Integer, T> fromIntMap = new java.util.HashMap<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we use our own datastructures here instead of the mutable ones?
In order to increase confidence in all those state changes, could we add a property based test that validates it against Java's BitSet after each step? Something similar to https://github.com/javaslang/javaslang/blob/master/javaslang/src/test/java/javaslang/collection/PriorityQueueTest.java#L226 (or better) Also, if you think it is appropriate, please consider adding benchmarks for your important methods (depends on #1335) |
Current coverage is 95.55%
@@ master #1334 diff @@
==========================================
Files 85 86 +1
Lines 9660 9988 +328
Methods 0 0
Messages 0 0
Branches 1752 1802 +50
==========================================
+ Hits 9233 9544 +311
- Misses 310 318 +8
- Partials 117 126 +9
|
Yes, I'll do it in separate PR. Also benchmarks and Performance table |
It would be nice if we have benchmarks for all methods of the performance table - just a thought. (midterm) |
It's progressing really nicely, @danieldietrich, @ruslansennov, what's the state of this PR? :) |
LGTM 😄 |
LveryGTM :-) |
Internal offset is not implemented yet, and I'm not sure it needed. Should be discussed in own issue