hstoerr

Delaware

stoerr.net

Age: 42

22h
revised When is it it practical to use DFS vs BFS?
added 25 characters in body
1d
awarded Nice Question
Jul
25
comment Comparison method violates its general contract! Java 7 only
How can NaNs be a problem with int? There are only float and double NaNs. 8-}
Jul
25
comment Comparison method violates its general contract! Java 7 only
Right, but just how does the compareTo implementation violate the contract?
Jul
25
revised When does TimSort complain about broken comparator?
give examples for comparators
Jul
25
revised When does TimSort complain about broken comparator?
added 13 characters in body
Jul
25
answered How to reproduce a "Comparison method violates its general contract" IllegalArgumentException
Jul
25
asked When does TimSort complain about broken comparator?
Jul
25
comment Java error: Comparison method violates its general contract
That should only be used as a quick and ugly workaround to make things work again until you fix the comparator. If the exception happens it means you comparator is buggy and the sort order will be weird. You have to consider all the rules given in docs.oracle.com/javase/7/docs/api/java/util/…) .
Jul
25
comment Java error: Comparison method violates its general contract
Actually, the example you given does not violate transitivity, but the rule sgn(compare(x, y)) == -sgn(compare(y, x)) as stated in docs.oracle.com/javase/7/docs/api/java/util/…) - that's antisymmetry in mathematical terms.
Jul
18
comment ParameterizedTest with a name in Eclipse Testrunner
Not true anymore.
Jul
18
comment JUnit test with dynamic number of tests
I don't know about theories, but parameterized tests in JUnit are shown separately in eclipse, not lumped together.
Jul
11
awarded Nice Question
Jul
9
awarded Yearling
Jul
2
awarded Inquisitive
Jul
2
awarded Curious
Jul
2
awarded Curious
Jul
2
awarded Notable Question
Jul
1
revised Is template "metaprogramming" in Java a good idea?
added 60 characters in body
Jul
1
answered Is template "metaprogramming" in Java a good idea?
1 2 3 4 5