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

Randomized has an issue about its constructors parameters order #1414

Open fabriciofx opened 4 years ago

fabriciofx commented 4 years ago

Randomized has an issue about its constructors parameters order. Look:

 public Randomized() // Ok
 public Randomized(final Integer len) // Ok
 public Randomized(final Scalar<Integer> len) // Ok
 public Randomized(final Character... chrs)  // Ok
 public Randomized(final List<Character> chrs) // Ok
 public Randomized(final Integer len, final Character... chrs) // Ok
 public Randomized(final Scalar<Integer> len, final Character... chrs) // Ok
 public Randomized(final List<Character> chrs, final Scalar<Integer> len) // Fail: we need swap these parameters
 public Randomized(final List<Character> chrs, final Scalar<Integer> len, final Random rnd) // Fail: random shoul be first

So, I proposed it:

 public Randomized()
 public Randomized(final Integer len)
 public Randomized(final Scalar<Integer> len)
 public Randomized(final Character... chrs)
 public Randomized(final List<Character> chrs)
 public Randomized(final Integer len, final Character... chrs)
 public Randomized(final Scalar<Integer> len, final Character... chrs)
 public Randomized(final Scalar<Integer> len, final List<Character> chrs,)
 public Randomized(final Random rnd, final Scalar<Integer> len, final List<Character> chrs)

@victornoel WDYT?

0crat commented 4 years ago

@victornoel/z please, pay attention to this issue

victornoel commented 4 years ago

@fabriciofx ok, let's do this but also add some more tests for the various constructors

victornoel commented 4 years ago

@0crat in

fabriciofx commented 4 years ago

@fabriciofx ok, let's do this but also add some more tests for the various constructors

@victornoel I agree!

0crat commented 3 years ago

The job #1414 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

victornoel commented 3 years ago

@0crat refuse

0crat commented 3 years ago

@0crat refuse (here)

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

victornoel commented 3 years ago

@0crat status

victornoel commented 3 years ago

@0crat refuse

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:

0crat commented 3 years ago

@0crat refuse (here)

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

victornoel commented 3 years ago

@0crat status