Advertisement
katiek

Sieve

Dec 21st, 2011
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. /**
  2.  * Unless overriden, any Sieve is a trivial one, letting through any element.
  3.  * @author kuksenok
  4.  */
  5. public class Sieve<T> implements Function<T,Boolean>{
  6.  
  7.     @Override
  8.     public Boolean eval(T in) {
  9.         return true;
  10.     }
  11.    
  12. }
  13.  
  14. /**
  15.  * This represents a very generic function from something of the type S to something of the type T.
  16.  * @author katie
  17.  */
  18. public interface Function<S,T> {
  19.     public T eval(S in);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement