Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8090441

Implement forEach bindings on ObservableLists

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • fx2.1
    • javafx
    • javafx-sdk2.1.0-beta-b19

      In JavaFX 1.3 it used to be something like that:

      var z : bind for (x : col) [x + 5];

      Some factories to create ObservableLists from ObservableLists and Intervals (not clear yet, if they should end up in Bindings or FXCollections), again generics are just guessed:

      public static <D, S> ObservableList<D> forEach(ObservableList<S> list, Runnable1<D, S> map) // dest = bind for (e in source) foo(e)
      public static <D, S> ObservableList<D> forEach(ObservableList<S> list, Runnable2<D, S, Integer> map) // dest = bind for (e in source) foo(e, index of e)
      public static <D, S> ObservableList<D> forEach(ObservableList<S> list, Map<S, D> map) // dest = bind for (e in source) foo(e, index of e)

      public static <D> ObservableList<D> forEach(int start, int end, Runnable1<D, Integer> map) // dest = bind for (i in [start, <end]) foo(i), interval constant
      public static <D> ObservableList<D> forEach(int start, int end, int step, Runnable1<D, Integer> map) // dest = bind for (i in [start, <end, step]) foo(i), interval constant

      public static <D> ObservableList<D> forEach(ObservableNumberValue start, ObservableNumberValue end, Runnable1<D, Integer> map) // dest = bind for (i in [start, <end]) foo(i), interval can change
      public static <D> ObservableList<D> forEach(ObservableNumberValue start, ObservableNumberValue end, ObservableNumberValue step, Runnable1<D, Integer> map) // dest = bind for (i in [start, <end, step]) foo(i), interval can change

            Unassigned Unassigned
            mrkam Alexander Kuznetcov (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported: