vavr-io/vavr

(Collection) factory methods

Open

#2.125 geöffnet am 8. Okt. 2017

Auf GitHub ansehen
 (2 Kommentare) (4 Reaktionen) (0 zugewiesene Personen)Java (605 Forks)batch import
!BACK-COMPATdesign/refactoring/improvementhelp wanted«vavr-collection»

Repository-Metriken

Stars
 (5.390 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 2T 17h) (13 gemergte PRs in 30 T)

Beschreibung

We have too many methods called of. Because most collections are also functions, I want to simplify that.

  • of(T), of(T...)
  • ofAll(Iterable)
  • ofAll(Iterator) <-- this one might be needed because Iterator (and the upcoming TraversableOnce) will not be Iterable anymore

We need to take a look if ofXyz(Xyz) or fromXyz(Xyz) makes more sense, e.g.

  • fromEntries(j.u.Map.Entry...)
  • fromEntries(Iterable<? extends j.u.Map.Entry>)
  • etc.

Also we will have distinguished factory method names that will not build instances directly from the given method parameters (like of(T...) does for example).

  • Stream.iterate(seed, f)
  • Tree.recurse(seed, f)
  • ...

Contributor Guide