Skip to content
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

NumberEnvelope should be named NumberOf #1335

Closed
victornoel opened this issue Mar 29, 2020 · 35 comments
Closed

NumberEnvelope should be named NumberOf #1335

victornoel opened this issue Mar 29, 2020 · 35 comments
Assignees
Milestone

Comments

@victornoel
Copy link
Collaborator

I noticed that NumberEnvelope wasn't a real envelope but just a given implementation of Number relying on Scalar.

I propose the following:

  • Rename current NumberEnvelope to NumberOf
  • Introduce NumberEnvelope as a real envelope wrapping any Number and delegating all methods including equals, hashCode and toString
  • Keep extending NumberEnvelope for existing subclasses but delegates to NumberOf (or directly to any other Number if possible)
  • Add the missing methods equals, hashCode and toString to NumberOf
    • this can be done as a second step with a todo not to do too much things at once
@0crat
Copy link
Collaborator

0crat commented Mar 29, 2020

@paulodamaso/z please, pay attention to this issue

@paulodamaso
Copy link
Contributor

@victornoel I agree, this will make Number implementation tree to be consistent with the other interface in cactoos

@paulodamaso
Copy link
Contributor

@0crat in

@0crat
Copy link
Collaborator

0crat commented Apr 23, 2020

The job #1335 assigned to @Englishman/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

@0crat
Copy link
Collaborator

0crat commented Jul 5, 2020

The architect of the project has changed; @paulodamaso/z is not at this role anymore; @victornoel/z is the architect now

@victornoel
Copy link
Collaborator Author

@0crat in

@0crat
Copy link
Collaborator

0crat commented Jul 7, 2020

The job #1335 assigned to @lavinj87/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

@victornoel
Copy link
Collaborator Author

@0crat refuse

1 similar comment
@victornoel
Copy link
Collaborator Author

@0crat refuse

@0crat
Copy link
Collaborator

0crat commented Jul 15, 2020

@0crat refuse (here)

@victornoel Job gh:yegor256/cactoos#1335 is not assigned, can't get performer

@0crat
Copy link
Collaborator

0crat commented Jul 15, 2020

@0crat refuse (here)

@victornoel The user @lavinj87/z resigned from #1335, please stop working. Reason for job resignation: Order was cancelled

@victornoel victornoel added this to the 1.0 milestone Sep 13, 2020
@0crat
Copy link
Collaborator

0crat commented Sep 15, 2020

The job #1335 assigned to @aivinog1/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

@victornoel
Copy link
Collaborator Author

@aivinog1 I see you are new around here, welcome. If you have questions don't hesitate to ask here, there are no incorrect questions :)

And also, if a task seems too much as a starter or you don't want to do it, don't hesitate to simply refuse it with @0crat refuse.

If you are inactive for too long (~10 days) on a task, I may remove it from you, so don't hesitate to ask questions :)

@0crat
Copy link
Collaborator

0crat commented Sep 15, 2020

Are you speaking to me or about me here; you must always start your message with my name if you want to address it to me, see §1

@aivinog1
Copy link
Contributor

@victornoel Hi, thanks! I have a question: what we should do with an existing: org.cactoos.scalar.NumberOf? :)

@victornoel
Copy link
Collaborator Author

@aivinog1 indeed, I see the situation is worst that what I imagined.

So we should try to have NumberOf exposing the same constructors as before, but the internal implementation to be the same as the class Sealed (which should then be deleted).

NumberEnvelope should be an abstract class extending Number (frankly I don't get why the Java std lib made Number a class instead of an interface… so we use it as if it was an interface) and delegating ALL methods to a wrapped Number.

@victornoel
Copy link
Collaborator Author

@0crat refuse

@0crat
Copy link
Collaborator

0crat commented Sep 27, 2020

@0crat refuse (here)

@victornoel The user @aivinog1/z resigned from #1335, please stop working. Reason for job resignation: Order was cancelled

@0crat
Copy link
Collaborator

0crat commented Sep 27, 2020

The job #1335 assigned to @ruca905/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

@catdog905
Copy link

catdog905 commented Sep 30, 2020

@victornoel, Hello, now NumberOf and NumberEnvelope is very similar. So i can not exactly understand difference. Is it right, that NumbeEnvelope wraps Number and implements all of method of Number.
On the other hand, NumberOf is class, which construct NumberEnvelope from different types(as TextOf) and didnot have to implement all of methods of Number.

@victornoel
Copy link
Collaborator Author

@ruca905 yes, you analysis is correct. Most of the work here is improving the naming of things, in the end we should have:

  • NumberEnvelope that only delegates to a wrapped Number (similarly to all other envelopes of cactoos)
  • NumberOf responsible of providing some constructors to define numbers using scalars
    • the current implementation should be transformed to be similar to current NumberEnvelope
    • maybe it is not needed to reimplement equals/hashCode/toString if they already are defined in the Number super class.
  • For all the current subclass of NumberEnvelope, instead of passing the scalars to super, it should pass them to a new NumberOf itself passed to super

I hope it is more clear.

@victornoel
Copy link
Collaborator Author

@ruca905 are you going to be solving this ticket?

@catdog905
Copy link

catdog905 commented Oct 19, 2020

Sorry, I thought that I was removed from this task due to the fact that I did not have time in accordance with the rule of 10 days and the zerocracy policy. I'll post a commit in a few hours.

@victornoel
Copy link
Collaborator Author

@ruca905 you can check the list of tasks assigned to you on 0crat.com btw.

@catdog905
Copy link

@victornoel, I have a problem. NumberEnvelope must wrap Number, so it should only have one NumberEnvelope (final Number num) constructor, but many project classes call NumberEnvelope (final Scalar <Long> lnm, final Scalar <Integer> inm, final Scalar <Float> fnm, final Scalar <Double> dnm). Do I need to leave this constructor or create a todo task to remove it?

victornoel added a commit to victornoel/cactoos that referenced this issue May 4, 2021
victornoel added a commit to victornoel/cactoos that referenced this issue May 8, 2021
victornoel added a commit to victornoel/cactoos that referenced this issue May 8, 2021
victornoel added a commit to victornoel/cactoos that referenced this issue May 8, 2021
victornoel added a commit to victornoel/cactoos that referenced this issue May 8, 2021
victornoel added a commit to victornoel/cactoos that referenced this issue May 13, 2021
victornoel added a commit to victornoel/cactoos that referenced this issue May 13, 2021
victornoel added a commit to victornoel/cactoos that referenced this issue May 15, 2021
victornoel added a commit to victornoel/cactoos that referenced this issue May 15, 2021
victornoel added a commit to victornoel/cactoos that referenced this issue May 15, 2021
victornoel added a commit to victornoel/cactoos that referenced this issue May 15, 2021
victornoel added a commit to victornoel/cactoos that referenced this issue May 16, 2021
victornoel added a commit to victornoel/cactoos that referenced this issue May 16, 2021
victornoel added a commit to victornoel/cactoos that referenced this issue May 16, 2021
victornoel added a commit to victornoel/cactoos that referenced this issue May 16, 2021
@victornoel
Copy link
Collaborator Author

@0crat status

@0crat
Copy link
Collaborator

0crat commented Jun 10, 2021

@0crat status (here)

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

  • The job #1335 is in scope for 11mon
  • The role is DEV
  • The job is assigned to @victornoel/z for 6mon
  • There is no monetary reward attached, it's a free job
  • The job has an impediment
  • The budget is 30 minutes/points
  • These users are banned and won't be assigned:
    • @victornoel/z: This user reported the ticket
    • @lavinj87/z: User was resigned from the ticket
    • @aivinog1/z: User was resigned from the ticket
    • @ruca905/z: User was resigned from the ticket
  • Job footprint (restricted area)

@0pdd
Copy link
Collaborator

0pdd commented Jun 12, 2021

@victornoel the puzzle #1617 is still not solved.

@0pdd
Copy link
Collaborator

0pdd commented Jul 11, 2022

@victornoel the puzzle #1640 is still not solved.

@0pdd
Copy link
Collaborator

0pdd commented Jul 15, 2022

@victornoel the puzzle #unknown is still not solved; solved: #1640.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants