javabuilders icon indicating copy to clipboard operation
javabuilders copied to clipboard

Stream API Support

Open monksy opened this issue 9 years ago • 5 comments

Add stream API support so that we don't have to write custom methods for doing simple stuff.

monksy avatar Oct 10 '14 18:10 monksy

Could you give me some samples and suggestions? Just learning all the ropes for Java 8 myself at this time...

jacek99 avatar Feb 03 '15 03:02 jacek99

Maybe KotliFx project can be useful for U. See: https://github.com/eugenkiss/kotlinfx/wiki https://github.com/eugenkiss/kotlinfx/wiki/Why-KotlinFX#ui-builders

I hope that:

  1. javabuilders is more simplicated than KotlinFx;
  2. javaBuilder can be used at Android in the future.

hhhxxjj avatar Feb 12 '15 01:02 hhhxxjj

sure thing, should be possible however I am still waiting for @monksy to give me some samples of how he things stream support could work and in what use cases

jacek99 avatar Feb 17 '15 15:02 jacek99

I guess the biggest example that I had in mind was:

Lets say that you have a table of <id, name, value> values and you had the underlying list named dataContents.

Lets also say that you have a search box above. Well the onaction could become:

incomingValue -> dataContents.stream().filter(s-> s.name.contains(incomingValue) || s.value.contains(incomingValue)).list()

The incoming value isn't hugely neccessary if you want to hard code that name. However this line would remove the code within the code behind, and it's just used for filtering the data contents. Its just a thought.

monksy avatar Feb 17 '15 16:02 monksy

sure, but that is on the code side, not in the YML side (which is where we focus). So I am not sure how you imagine it being integrated.

With the improvements in Java 8, a lot of the verbosity is cut down.

jacek99 avatar Feb 17 '15 16:02 jacek99