My favorites
|
Sign in
hamcrest-collections
A library using hamcrest to manipulate collections
Project Home
Downloads
Wiki
Issues
Source
Checkout
|
Browse
|
Changes
|
r7
Source path:
svn
/
trunk
/
hamcrest-collections
/
src
/
org
/
hamcrestcollections
/
Reducer.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package org.hamcrestcollections;
/**
* <p>
* A {@code Reducer} quite literally reduces two arguments down to one. Used as part of a {@link Reduction}.
* </p>
*
* <p>
* Examples of a {@code Reducer} might include a sum function that adds all the items of a list together, or a
* string builder used to concatinate many strings together
* </p?
*
* @see Reduction
* @author Sam Newman (sam-newman@magpiebrain.com)
*/
public interface Reducer<T> {
T apply(T first, T second);
}
Show details
Hide details
Change log
r3
by sam.newman on Aug 09, 2007
Diff
Initial Checkin
Go to:
/trunk/hamcrest-collections
...k/hamcrest-collections/build.xml
...ections/hamcrest-collections.iml
...-collections/lib/junit-4.3.1.jar
...tcollections/FunctionMapper.java
...mcrestcollections/Functions.java
...mcrestcollections/ListUtils.java
...hamcrestcollections/Reducer.java
...mcrestcollections/Reduction.java
...stcollections/RejectMatcher.java
...stcollections/SelectMatcher.java
...amcrestcollections/Selector.java
.../hamcrestcollections/Zipper.java
...collections/FunctionMapTest.java
...lections/FunctionReduceTest.java
...llections/SelectMatcherTest.java
...crestcollections/ZipperTest.java
Project members,
sign in
to write a code review
Older revisions
All revisions of this file
File info
Size: 509 bytes, 18 lines
View raw file
Hosted by