org.rightcollections
Interface Function<R,A>

Type Parameters:
R -
A -
All Known Subinterfaces:
Closure<E>, Predicate<E>
All Known Implementing Classes:
MaxElementClosure

public interface Function<R,A>

Function to apply to arguments when transforming collecions.

Author:
Ruslan Pilin

Method Summary
 R apply(A argument)
          Applies this function on an argument.
 boolean equals(java.lang.Object obj)
          Checks equality of function.
 

Method Detail

apply

R apply(A argument)
Applies this function on an argument.

Parameters:
argument - to apply function on.
Returns:
f(argument)

equals

boolean equals(java.lang.Object obj)
Checks equality of function. Function a.equals(b) if and only if for all x a(x) = b(x).

Overrides:
equals in class java.lang.Object
Parameters:
obj - an other function to compare with this.
Returns:
true if obj is equals to this function.


Copyright © 2009 Ruslan Pilin. All Rights Reserved.