Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: own stream reduction Date: Sat, 2 Apr 2016 10:23:44 -0400 Organization: A noiseless patient Spider Lines: 18 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 2 Apr 2016 14:20:39 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="2d081e2f7155c28005d4472f67c2f43d"; logging-data="7531"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX180UBcxeqxzPyQncRnXS0G1" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 In-Reply-To: Cancel-Lock: sha1:5sohNhBjMZKTfNGAPRQs4CW2Mt4= Xref: csiph.com comp.lang.java.programmer:34057 On 4/2/2016 10:10 AM, Philipp Kraus wrote: > Hello, > > I try to buld an own reduction stream reduction for my data structure. > [...] > I'm searching for a tutorial or example how I can create an own reduce operator of my own type. The Java Tutorial has a page showing how a few simple reduction operations can be built "from the ground up:" http://docs.oracle.com/javase/tutorial/collections/streams/reduction.html Also, the Javadoc for java.util.stream has some material that looks useful. -- esosman@comcast-dot-net.invalid "Don't be afraid of work. Make work afraid of you." -- TLM