Skip to main content
bowmore's user avatar
bowmore's user avatar
bowmore's user avatar
bowmore
  • Member for 11 years, 10 months
  • Last seen this week
comment
Save parameters in a "key: value" format
Could you give the full class listing, some optimizations may involve changing the way the class is designed.
revised
Java Stream Exception Handling
added 338 characters in body
Loading…
answered
Loading…
answered
Loading…
comment
Immutable objects in Java
LocalDateis to be prefered over Date and over storing a long. If you don't have access to Java 8's LocalDate it is well worth rolling your own. The problem with Date (and by extension long) is that they represent a point in time, and depending on which time zone is used to look at that point in time, it may fall on different dates.
comment
Removing elements on a List while iterating through it
@maaartinus To keep O(n) for an ArrayList simply loop and collect all elements to be removed in a separate collection, then call removeAll() on the ArrayList.
revised
Concurrent Linked Hash Set
added 45 characters in body
Loading…
comment
Concurrent Linked Hash Set
Not all threads waiting are threads that will change isUpdating.
reviewed
Approve
answered
Loading…
comment
Partitioning a list to a list of smaller lists
You could overload the method, with one that takes a List instead of an Iterable and return a List of subLists of the original list.
comment
If-statement consolidation
@Vogel612 well, I'm not familiar enough with javascript to judge that. But the amount of effort needed, does not invalidate the benefits of using the pattern. Of course we shouldn't blindly apply patterns, for the sake of having patterns. But if this same if structure (bottom/left/right) is repeated several times throughout the code, then the pattern is probably worthwhile. If it's just this one occurrence, then even in Java it would be overkill.
revised
If-statement consolidation
added 1 character in body
Loading…
comment
If-statement consolidation
Ok, nevertheless, the pattern is applicable in javascript just as well I'd say.
answered
Loading…
answered
Loading…
Loading…
revised
Loading…
revised
Loading…
Loading…
1
4 5
6
7 8
17