Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #33295
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2015-12-04 05:12 -0800 |
| Message-ID | <ebc5a67f-5968-4b4e-8461-913f69587492@googlegroups.com> (permalink) |
| Subject | stream collect with own class |
| From | Philipp Kraus <philipp.kraus.flashpixx@gmail.com> |
Hello,
I'm using streams and I would like to create "fuzzy logic implications". In short call, I have a collection with
Set<IFuzzy> x;
and my IFuzzy interface is defined like
public interface IFuzzy
{
public Boolean getResult();
public Double getFuzzy();
}
I run in my code
IFuzzy y = x.stream()......
I would like to implode / aggregate each IFuzzy object into one result, so I need to call on each element from x the getResult() and the getFuzzy() method and collect / implode the data.
How can I do this call with a stream operation? IMHO I need to write an operator like allMatch()
Thanks
Phil
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread
stream collect with own class Philipp Kraus <philipp.kraus.flashpixx@gmail.com> - 2015-12-04 05:12 -0800
Re: stream collect with own class Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-12-04 08:58 -0500
Re: stream collect with own class Philipp Kraus <philipp.kraus.flashpixx@gmail.com> - 2015-12-04 14:46 -0800
Re: stream collect with own class Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-12-05 08:34 -0500
Re: stream collect with own class Philipp Kraus <philipp.kraus.flashpixx@gmail.com> - 2015-12-05 07:36 -0800
Re: stream collect with own class Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-12-05 10:57 -0500
csiph-web