yegor256 / cactoos

Object-Oriented Java primitives, as an alternative to Google Guava and Apache Commons
https://www.cactoos.org
MIT License
737 stars 163 forks source link

Add `equals`, `hashCode` and `toString` to `Constant` #1616

Closed andreoss closed 1 year ago

andreoss commented 3 years ago
codecov-commenter commented 3 years ago

Codecov Report

Merging #1616 (f9abb8d) into master (a9c3bdc) will decrease coverage by 0.11%. The diff coverage is 77.77%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1616      +/-   ##
============================================
- Coverage     90.16%   90.05%   -0.12%     
+ Complexity     1616     1608       -8     
============================================
  Files           302      298       -4     
  Lines          3784     3759      -25     
  Branches        121      122       +1     
============================================
- Hits           3412     3385      -27     
  Misses          339      339              
- Partials         33       35       +2     
Impacted Files Coverage Δ
src/main/java/org/cactoos/scalar/Constant.java 84.61% <77.77%> (-15.39%) :arrow_down:
src/main/java/org/cactoos/scalar/Solid.java 90.00% <0.00%> (-10.00%) :arrow_down:
src/main/java/org/cactoos/iterable/IterableOf.java 95.83% <0.00%> (-0.17%) :arrow_down:
src/main/java/org/cactoos/scalar/Sealed.java
src/main/java/org/cactoos/scalar/SumOfInt.java
src/main/java/org/cactoos/scalar/SumOfFloat.java
...c/main/java/org/cactoos/scalar/NumberEnvelope.java
src/main/java/org/cactoos/scalar/NumberOf.java
src/main/java/org/cactoos/scalar/MaxOf.java
src/main/java/org/cactoos/scalar/SumOfDouble.java
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a9c3bdc...f9abb8d. Read the comment docs.

victornoel commented 3 years ago

@0crat status

0crat commented 3 years ago

@0crat status (here)

@victornoel This is what I know about this job in C63314D6Z, as in §32:

victornoel commented 3 years ago

@0crat in

0crat commented 3 years ago

@victornoel/z everybody who has role REV is banned at #1616; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

victornoel commented 3 years ago

@andreoss I'm not exactly sure what would justify having Scalar objects implement those methods... I know that Text has such methods implemented and even there I'm not sure it's relevant.

The only places where they make sense to me is for classes used to purely store data, such as collections.

Did you have a particular need in mind for this PR?

0crat commented 3 years ago

@victornoel/z everybody who has role REV is banned at #1616; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

andreoss commented 3 years ago

@victornoel Constant (as many Scalar implementations) is troublesome to use without calling value(). I expect that two identical constants should be equal at least. toString simplifies logging, as I primarily use Constant as configuration defaults.

0crat commented 3 years ago

@victornoel/z everybody who has role REV is banned at #1616; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat commented 3 years ago

@victornoel/z everybody who has role REV is banned at #1616; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat commented 3 years ago

@victornoel/z everybody who has role REV is banned at #1616; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat commented 3 years ago

@victornoel/z everybody who has role REV is banned at #1616; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat commented 3 years ago

@victornoel/z everybody who has role REV is banned at #1616; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat commented 2 years ago

@victornoel/z everybody who has role REV is banned at #1616; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat commented 2 years ago

@victornoel/z everybody who has role REV is banned at #1616; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat commented 2 years ago

@victornoel/z everybody who has role REV is banned at #1616; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat commented 2 years ago

@victornoel/z everybody who has role REV is banned at #1616; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat commented 2 years ago

@victornoel/z everybody who has role REV is banned at #1616; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

0crat commented 2 years ago

@victornoel/z everybody who has role REV is banned at #1616; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)