Apache Commons logo Commons Functor
Apache Commons Functor ™
  • Last Published: 27 February 2014
  • |
  • Version: 1.0-SNAPSHOT

Commons Functor: Function Objects for Java

A functor is a function that can be manipulated as an object, or an object representing a single, generic function.

Functors support and encourage a number of powerful programming techniques including:

  • programming in a functional style
  • higher order functions
  • internal iterators
  • reuse and specialization through composition rather than inheritance and overloading
  • generic "callback" or "extension point" APIs
  • generic "filters" or predicate APIs
  • many "behavioral" design patterns, such as Visitor, Strategy, Chain of Responsibility, etc.

See the examples for more information on some of these techniques.

Overview

Commons Functor defines three general types of functors:

predicates
functors that return a boolean value
functions
functors that return an Object value
procedures
functors that don't return anything

The root functor package defines three signatures for each functor type--taking zero, one or two Object arguments.

The remaining packages provide common functor implementations, adapters and utilities.

Releases

There are not releases yet.

Copyright © 2003-2014 The Apache Software Foundation. All Rights Reserved.

Apache Commons, Apache Commons Functor, Apache, the Apache feather logo, and the Apache Commons project logos are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.

AltStyle によって変換されたページ (->オリジナル) /