polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [28/50] [abbrv] zest-qi4j git commit: Removed Function, Function2 and Specification and replaced with the equivalents in JDK, Function, BiFunction and Predicate.
Date Fri, 17 Apr 2015 16:08:40 GMT
Removed Function, Function2 and Specification and replaced with the equivalents in JDK, Function, BiFunction and Predicate.


Project: http://git-wip-us.apache.org/repos/asf/zest-qi4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-qi4j/commit/9479a63e
Tree: http://git-wip-us.apache.org/repos/asf/zest-qi4j/tree/9479a63e
Diff: http://git-wip-us.apache.org/repos/asf/zest-qi4j/diff/9479a63e

Branch: refs/heads/3.0
Commit: 9479a63e998a949af53d9a51d480d43a72d24067
Parents: 3bf71df
Author: Niclas Hedhman <niclas@hedhman.org>
Authored: Fri Oct 3 17:12:06 2014 +0800
Committer: Niclas Hedhman <niclas@hedhman.org>
Committed: Fri Oct 3 17:12:06 2014 +0800

----------------------------------------------------------------------
 build.gradle                                    | 108 ++++----
 core/api/src/main/java/org/qi4j/api/Qi4j.java   |   8 +-
 .../main/java/org/qi4j/api/common/MetaInfo.java |   2 +-
 .../main/java/org/qi4j/api/common/TypeName.java |   2 +-
 .../java/org/qi4j/api/common/UseDefaults.java   |   2 +-
 .../qi4j/api/composite/CompositeContext.java    |   2 +-
 .../org/qi4j/api/composite/PropertyMapper.java  |   4 +-
 .../qi4j/api/configuration/Configuration.java   |   4 +-
 .../ConstraintViolationException.java           |   6 +-
 .../main/java/org/qi4j/api/dataset/DataSet.java |   6 +-
 .../main/java/org/qi4j/api/dataset/Query.java   |   4 +-
 .../api/dataset/iterable/IterableDataSet.java   |   6 +-
 .../api/dataset/iterable/IterableQuery.java     |   4 +-
 .../qi4j/api/query/NotQueryableException.java   |   2 +-
 .../java/org/qi4j/api/query/QueryBuilder.java   |   4 +-
 .../org/qi4j/api/query/QueryExpressions.java    |  12 +-
 .../api/query/grammar/AndSpecification.java     |  10 +-
 .../api/query/grammar/AssociationFunction.java  |  12 +-
 .../AssociationNotNullSpecification.java        |   7 +-
 .../grammar/AssociationNullSpecification.java   |   7 +-
 .../api/query/grammar/BinarySpecification.java  |  10 +-
 .../query/grammar/ComparisonSpecification.java  |   7 +-
 .../query/grammar/ContainsAllSpecification.java |   7 +-
 .../query/grammar/ContainsSpecification.java    |   7 +-
 .../query/grammar/ExpressionSpecification.java  |  42 ---
 .../ManyAssociationContainsSpecification.java   |   7 +-
 .../query/grammar/ManyAssociationFunction.java  |   6 +-
 .../api/query/grammar/MatchesSpecification.java |   7 +-
 ...medAssociationContainsNameSpecification.java |   7 +-
 .../NamedAssociationContainsSpecification.java  |   7 +-
 .../query/grammar/NamedAssociationFunction.java |   6 +-
 .../api/query/grammar/NotSpecification.java     |  14 +-
 .../qi4j/api/query/grammar/OrSpecification.java |  10 +-
 .../api/query/grammar/PropertyFunction.java     |  10 +-
 .../grammar/PropertyNotNullSpecification.java   |   7 +-
 .../grammar/PropertyNullSpecification.java      |   7 +-
 .../api/query/grammar/PropertyReference.java    |   2 +-
 .../api/query/grammar/QuerySpecification.java   |   8 +-
 .../api/service/importer/InstanceImporter.java  |   4 +-
 .../importer/ServiceSelectorImporter.java       |   6 +-
 .../org/qi4j/api/service/qualifier/Active.java  |   4 +-
 .../service/qualifier/AnnotationQualifier.java  |   4 +-
 .../qi4j/api/service/qualifier/Available.java   |   4 +-
 .../qi4j/api/service/qualifier/HasMetaInfo.java |   8 +-
 .../api/service/qualifier/IdentifiedBy.java     |   4 +-
 .../api/service/qualifier/ServiceQualifier.java |  36 +--
 .../org/qi4j/api/service/qualifier/Tagged.java  |   4 +-
 .../java/org/qi4j/api/type/CollectionType.java  |   2 +-
 .../main/java/org/qi4j/api/type/MapType.java    |   2 +-
 .../qi4j/api/type/MatchTypeSpecification.java   |   6 +-
 .../org/qi4j/api/type/ValueCompositeType.java   |   2 +-
 .../main/java/org/qi4j/api/type/ValueType.java  |   4 +-
 .../api/unitofwork/NoSuchEntityException.java   |   6 +-
 .../java/org/qi4j/api/util/Annotations.java     |  24 +-
 .../main/java/org/qi4j/api/util/Classes.java    | 116 ++++----
 .../java/org/qi4j/api/util/Constructors.java    |   4 +-
 .../src/main/java/org/qi4j/api/util/Fields.java |  12 +-
 .../main/java/org/qi4j/api/util/Methods.java    |  14 +-
 .../org/qi4j/api/value/ValueBuilderFactory.java |   2 +-
 .../org/qi4j/api/value/ValueDeserializer.java   |   6 +-
 .../org/qi4j/api/value/ValueSerializer.java     |   2 +-
 .../test/java/org/qi4j/api/OperatorsTest.java   |  10 +-
 .../org/qi4j/api/common/QualifiedNameTest.java  |   8 +-
 .../IntegerRangeSpecificationTest.java          |  60 ++++
 .../api/specification/SpecificationsTest.java   |  88 ++++++
 .../java/org/qi4j/api/util/ClassesTest.java     |   6 +-
 .../qi4j/api/value/DocumentationSupport.java    |   4 +-
 .../org/qi4j/bootstrap/ApplicationAssembly.java |   2 +-
 .../qi4j/bootstrap/AssemblySpecifications.java  |  10 +-
 .../java/org/qi4j/bootstrap/ClassScanner.java   |  34 +--
 .../java/org/qi4j/bootstrap/LayerAssembly.java  |  14 +-
 .../java/org/qi4j/bootstrap/ModuleAssembly.java |  14 +-
 .../qi4j/bootstrap/DocumentationSupport.java    |   6 +-
 .../main/java/org/qi4j/functional/ForEach.java  |   4 +-
 .../main/java/org/qi4j/functional/Function.java |  35 ---
 .../java/org/qi4j/functional/Function2.java     |  33 ---
 .../java/org/qi4j/functional/Functions.java     | 275 -------------------
 .../java/org/qi4j/functional/Iterables.java     |  68 ++---
 .../java/org/qi4j/functional/Specification.java |  37 ---
 .../org/qi4j/functional/Specifications.java     | 113 +++-----
 .../java/org/qi4j/functional/FunctionsTest.java | 125 ---------
 .../IntegerRangeSpecificationTest.java          |  59 ----
 .../java/org/qi4j/functional/IterablesTest.java |  27 +-
 .../org/qi4j/functional/SpecificationsTest.java |  85 ------
 .../functional/docsupport/FunctionalDocs.java   |  20 +-
 .../src/main/java/org/qi4j/io/Transforms.java   |  32 +--
 .../test/java/org/qi4j/io/InputOutputTest.java  |   6 +-
 .../AbstractAssociationInstance.java            |   8 +-
 .../association/AssociationInstance.java        |   4 +-
 .../association/ManyAssociationInstance.java    |   4 +-
 .../association/ManyAssociationModel.java       |   8 +-
 .../association/NamedAssociationInstance.java   |   4 +-
 .../association/NamedAssociationModel.java      |   8 +-
 .../bootstrap/CompositeAssemblyImpl.java        |  24 +-
 .../runtime/bootstrap/EntityAssemblyImpl.java   |   2 +-
 .../runtime/bootstrap/LayerAssemblyImpl.java    |  14 +-
 .../runtime/bootstrap/ModuleAssemblyImpl.java   |  26 +-
 .../runtime/bootstrap/ServiceAssemblyImpl.java  |   4 +-
 .../runtime/bootstrap/ValueAssemblyImpl.java    |   2 +-
 .../runtime/composite/CompositeMethodModel.java |   6 +-
 .../composite/ConstraintDeclaration.java        |   6 +-
 .../runtime/composite/ConstructorsModel.java    |   4 +-
 .../runtime/composite/GenericSpecification.java |   6 +-
 .../org/qi4j/runtime/composite/MixinsModel.java |  14 +-
 .../runtime/composite/TransientInstance.java    |   2 +-
 .../runtime/entity/EntityStateInstance.java     |  20 +-
 .../qi4j/runtime/injection/Dependencies.java    |   4 +-
 .../qi4j/runtime/injection/DependencyModel.java |  10 +-
 .../runtime/injection/InjectedFieldModel.java   |   6 +-
 .../runtime/injection/InjectedFieldsModel.java  |   6 +-
 .../runtime/injection/InjectedMethodsModel.java |   2 +-
 .../injection/InjectedParametersModel.java      |   6 +-
 .../InvocationInjectionProviderFactory.java     |   4 +-
 .../ModifiesInjectionProviderFactory.java       |   2 +-
 .../ServiceInjectionProviderFactory.java        |  22 +-
 .../provider/ThisInjectionProviderFactory.java  |   2 +-
 .../qi4j/runtime/query/IterableQuerySource.java |  16 +-
 .../qi4j/runtime/query/QueryBuilderImpl.java    |   8 +-
 .../java/org/qi4j/runtime/query/QueryImpl.java  |   6 +-
 .../service/ImportedServicesInstance.java       |   6 +-
 .../qi4j/runtime/service/ServiceInstance.java   |   2 +-
 .../org/qi4j/runtime/service/ServiceModel.java  |   2 +-
 .../qi4j/runtime/service/ServicesInstance.java  |   6 +-
 .../qi4j/runtime/structure/LayerInstance.java   |  12 +-
 .../org/qi4j/runtime/structure/ModelModule.java |   6 +-
 .../qi4j/runtime/structure/ModuleInstance.java  |  28 +-
 .../runtime/structure/ModuleUnitOfWork.java     |   8 +-
 .../org/qi4j/runtime/structure/TypeLookup.java  |  22 +-
 .../runtime/structure/UsedLayersInstance.java   |  12 +-
 .../structure/VisibilitySpecification.java      |  12 +-
 .../qi4j/runtime/types/ValueTypeFactory.java    |  20 +-
 .../runtime/unitofwork/BuilderEntityState.java  |   2 +-
 .../composite/CompositeFactoryImplTest.java     |   2 +-
 .../runtime/composite/FunctionalListTest.java   |   6 +-
 .../runtime/injection/ServiceInjectionTest.java |   8 +-
 .../org/qi4j/runtime/mixin/JDKMixinTest.java    |  10 +-
 .../qi4j/runtime/mixin/MixinPrecedenceTest.java |   2 +-
 .../org/qi4j/runtime/property/PropertyTest.java |   2 +-
 .../org/qi4j/runtime/structure/ModuleTest.java  |   2 +-
 .../src/test/java/org/qi4j/test/ASMTest.java    |  58 ++--
 .../test/composite/CleanStackTraceTest.java     |   4 +-
 .../org/qi4j/spi/entity/QualifiedIdentity.java  |   5 +-
 .../entitystore/helpers/DefaultEntityState.java |   2 +-
 .../java/org/qi4j/spi/query/EntityFinder.java   |   8 +-
 .../java/org/qi4j/spi/query/QuerySource.java    |   8 +-
 .../spi/value/ValueDeserializerAdapter.java     |  71 +++--
 .../qi4j/spi/value/ValueSerializerAdapter.java  |  56 ++--
 .../orgjson/OrgJsonValueDeserializer.java       |  16 +-
 .../orgjson/OrgJsonValueSerialization.java      |   8 +-
 .../helpers/JSONManyAssociationStateTest.java   |   4 +-
 .../org/qi4j/test/AbstractQi4jBaseTest.java     |   2 +-
 .../org/qi4j/test/AbstractQi4jScenarioTest.java |   2 +-
 .../qi4j/test/cache/AbstractCachePoolTest.java  |   2 +-
 .../test/entity/AbstractEntityStoreTest.java    |   2 +-
 .../test/indexing/AbstractAnyQueryTest.java     |   2 +-
 .../test/indexing/AbstractComplexQueryTest.java |   2 +-
 .../test/indexing/AbstractEntityFinderTest.java |   6 +-
 .../test/indexing/AbstractNamedQueryTest.java   |  10 +-
 .../qi4j/test/indexing/AbstractQueryTest.java   |   2 +-
 .../elasticsearch/ElasticSearchFinder.java      |  22 +-
 .../qi4j/index/rdf/query/RdfQueryParser.java    |   4 +-
 .../qi4j/index/rdf/query/RdfQueryService.java   |   8 +-
 .../rdf/query/internal/RdfQueryParserImpl.java  |  12 +-
 .../org/qi4j/index/rdf/RdfNamedQueryTest.java   |   4 +-
 .../solr/internal/SolrEntityQueryMixin.java     |   8 +-
 .../org/qi4j/index/solr/SolrNamedQueryTest.java |   4 +-
 .../index/sql/internal/SQLEntityFinder.java     |   8 +-
 .../qi4j/index/sql/support/api/SQLQuerying.java |   4 +-
 .../support/postgresql/PostgreSQLQuerying.java  |   4 +-
 .../support/skeletons/AbstractSQLIndexing.java  |   9 +-
 .../support/skeletons/AbstractSQLQuerying.java  |  68 ++---
 .../support/skeletons/AbstractSQLStartup.java   |  12 +-
 .../skeletons/SQLCompatEntityStateWrapper.java  |  10 +-
 .../jackson/JacksonValueDeserializer.java       |  16 +-
 .../JacksonValueSerializationAssembler.java     |   2 +-
 .../OrgJsonValueSerializationAssembler.java     |   2 +-
 .../stax/StaxValueDeserializer.java             |  12 +-
 .../stax/StaxValueSerializationAssembler.java   |   2 +-
 .../library/circuitbreaker/CircuitBreaker.java  |   8 +-
 .../library/circuitbreaker/CircuitBreakers.java |  16 +-
 .../conversion/values/EntityToValue.java        |  24 +-
 .../conversion/values/EntityToValueTest.java    |   4 +-
 .../org/qi4j/library/cxf/Qi4jTypeCreator.java   |   2 +-
 .../qi4j/library/cxf/ValueCompositeCxfType.java |  20 +-
 .../source/jdbm/JdbmEventStoreService.java      |   4 +-
 .../source/jdbm/JdbmEventStoreServiceTest.java  |   4 +-
 .../source/helper/ApplicationEvents.java        |  52 ++--
 .../factory/DomainEventFactoryService.java      |   2 +-
 .../domain/source/helper/EventRouter.java       |  10 +-
 .../domain/source/helper/Events.java            |  66 ++---
 .../domain/source/helper/UnitOfWorkRouter.java  |  10 +-
 .../eventsourcing/domain/DomainEventTest.java   |   4 +-
 .../source/helper/DomainEventTrackerTest.java   |   4 +-
 .../jmx/ConfigurationManagerService.java        |   4 +-
 .../java/org/qi4j/library/jmx/Qi4jMBeans.java   |   6 +-
 .../org/qi4j/lang/scala/ScalaTraitMixin.java    |   6 +-
 .../debug/service/DebugOnConsoleSideEffect.java |   2 +-
 .../debug/service/DebuggingServiceMixin.java    |   2 +-
 .../org/qi4j/logging/log/SimpleLogConcern.java  |   2 +-
 .../log/service/LogOnConsoleSideEffect.java     |   2 +-
 .../log/service/LoggingServiceMixin.java        |   2 +-
 .../trace/service/TraceServiceMixin.java        |   2 +-
 .../java/org/qi4j/logging/DebuggingTest.java    |   5 +-
 .../rdf/entity/EntityStateSerializer.java       |   2 +-
 .../rdf/entity/EntityTypeSerializer.java        |   2 +-
 .../org/qi4j/library/rdf/model/Model2XML.java   |   4 +-
 .../org/qi4j/library/rdf/Model2XMLTest.java     |   2 +-
 .../rest/client/api/ContextResourceClient.java  |  10 +-
 .../library/rest/client/api/ErrorHandler.java   |  18 +-
 .../library/rest/client/api/HandlerCommand.java |   4 +-
 .../library/rest/common/link/LinksUtil.java     |  30 +-
 .../library/rest/common/table/TableBuilder.java |   6 +-
 .../rest/common/table/TableBuilderFactory.java  |   2 +-
 .../library/rest/common/table/TableQuery.java   |   2 +-
 .../server/assembler/RestServerAssembler.java   |   6 +-
 .../freemarker/ValueCompositeTemplateModel.java |  12 +-
 .../requestreader/DefaultRequestReader.java     |  10 +-
 .../sql/liquibase/LiquibaseServiceTest.java     |   4 +-
 .../library/sql/datasource/DataSources.java     |   4 +-
 .../struts2/ConstraintViolationInterceptor.java |   2 +-
 .../library/struts2/util/ClassNameFilters.java  |   4 +-
 .../library/struts2/util/ClassNameMapper.java   |   4 +-
 .../qi4j/library/struts2/util/ClassNames.java   |   2 +-
 .../sample_a/bootstrap/assembly/Assembler.java  |   4 +-
 .../conversion/EntityToDTOService.java          |  18 +-
 .../sample_a/bootstrap/test/TestAssembler.java  |   4 +-
 .../sample_b/bootstrap/assembly/Assembler.java  |   4 +-
 .../conversion/EntityToDTOService.java          |  18 +-
 .../sample_b/bootstrap/test/TestAssembler.java  |   4 +-
 .../samples/forum/assembler/ForumAssembler.java |   4 +-
 .../org/qi4j/samples/forum/context/Context.java |   2 +-
 .../samples/forum/context/EventsService.java    |   4 +-
 .../samples/forum/domainevent/DomainEvent.java  |   4 +-
 .../java/org/qi4j/sample/rental/web/Page.java   |   2 +-
 .../qi4j/sample/rental/web/QuikitServlet.java   |   4 +-
 .../rental/web/assembly/StorageModule.java      |   4 +-
 236 files changed, 1314 insertions(+), 1900 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index c8fdcd3..8e434c3 100644
--- a/build.gradle
+++ b/build.gradle
@@ -175,7 +175,7 @@ allprojects {
   if( ext.javaDir.isDirectory() || ext.scalaDir.isDirectory() ||
       ext.testJavaDir.isDirectory() || ext.testScalaDir.isDirectory() )
   {
-    apply plugin: 'jacoco'
+//    apply plugin: 'jacoco'
     apply plugin: 'osgi'
     apply plugin: VersionClass
     apply plugin: AsciidocBuildInfo
@@ -340,63 +340,63 @@ test {
 
 // Jacoco
 configurations {
-  jacoco
+//  jacoco
 }
 dependencies {
-  jacoco 'org.jacoco:org.jacoco.ant:0.7.1.201405082137'
+//  jacoco 'org.jacoco:org.jacoco.ant:0.7.1.201405082137'
 }
 // Generate a global code codeverage report
-task coverageReport {
-  dependsOn subprojects*.test
-  def outputPath = "build/reports/coverage"
-  def coveredProjects = subprojects.findAll { p -> new File( "${p.buildDir.path}/jacoco" ).exists() }
-  def coreProjects = coveredProjects.findAll { p -> p.name.startsWith('org.qi4j.core' ) }
-  def libProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.qi4j.lib' ) }
-  def extProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.qi4j.ext' ) }
-  def toolsProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.qi4j.tool' ) }
-  def tutoProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.qi4j.tuto' ) }
-  def samplesProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.qi4j.sample' ) }
-  ant {
-    taskdef name:'jacocoreport', classname: 'org.jacoco.ant.ReportTask', classpath: configurations.jacoco.asPath
-    mkdir dir: outputPath
-    jacocoreport {
-      executiondata {
-        coveredProjects.collect { p -> fileset( dir: "${p.buildDir.path}/jacoco" ) { include( name: '*.exec' ) } }
-      }
-      structure( name: "Qi4j SDK" ) {
-        group( name: "Core" ) {
-          classfiles { coreProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main" } }
-          sourcefiles { coreProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java" } }
-        }
-        group( name: "Libraries" ) {
-          classfiles { libProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main" } }
-          sourcefiles { libProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java" } }
-        }
-        group( name: "Extensions" ) {
-          classfiles { extProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main" } }
-          sourcefiles { extProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java" } }
-        }
-        group( name: "Tools" ) {
-          classfiles { toolsProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main" } }
-          sourcefiles { toolsProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java" } }
-        }
-        group( name: "Tutorials" ) {
-          classfiles { tutoProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main" } }
-          sourcefiles { tutoProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java" } }
-        }
-        group( name: "Samples" ) {
-          classfiles { samplesProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main" } }
-          sourcefiles { samplesProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java" } }
-        }
-      }
-      csv  destfile: "${outputPath}/jacoco.csv", encoding: "UTF-8"
-      xml  destfile: "${outputPath}/jacoco.xml", encoding: "UTF-8"
-      html destdir:  outputPath, encoding: "UTF-8", locale: "en", footer: "Qi4j SDK"
-    }
-  }
-  inputs.dir coveredProjects.collect { p -> "${p.buildDir.path}/jacoco" }
-  outputs.dir outputPath
-}
+//task coverageReport {
+//  dependsOn subprojects*.test
+//  def outputPath = "build/reports/coverage"
+//  def coveredProjects = subprojects.findAll { p -> new File( "${p.buildDir.path}/jacoco" ).exists() }
+//  def coreProjects = coveredProjects.findAll { p -> p.name.startsWith('org.qi4j.core' ) }
+//  def libProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.qi4j.lib' ) }
+//  def extProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.qi4j.ext' ) }
+//  def toolsProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.qi4j.tool' ) }
+//  def tutoProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.qi4j.tuto' ) }
+//  def samplesProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.qi4j.sample' ) }
+//  ant {
+//    taskdef name:'jacocoreport', classname: 'org.jacoco.ant.ReportTask', classpath: configurations.jacoco.asPath
+//    mkdir dir: outputPath
+//    jacocoreport {
+//      executiondata {
+//        coveredProjects.collect { p -> fileset( dir: "${p.buildDir.path}/jacoco" ) { include( name: '*.exec' ) } }
+//      }
+//      structure( name: "Qi4j SDK" ) {
+//        group( name: "Core" ) {
+//          classfiles { coreProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main" } }
+//          sourcefiles { coreProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java" } }
+//        }
+//        group( name: "Libraries" ) {
+//          classfiles { libProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main" } }
+//          sourcefiles { libProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java" } }
+//        }
+//        group( name: "Extensions" ) {
+//          classfiles { extProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main" } }
+//          sourcefiles { extProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java" } }
+//        }
+//        group( name: "Tools" ) {
+//          classfiles { toolsProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main" } }
+//          sourcefiles { toolsProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java" } }
+//        }
+//        group( name: "Tutorials" ) {
+//          classfiles { tutoProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main" } }
+//          sourcefiles { tutoProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java" } }
+//        }
+//        group( name: "Samples" ) {
+//          classfiles { samplesProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main" } }
+//          sourcefiles { samplesProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java" } }
+//        }
+//      }
+//      csv  destfile: "${outputPath}/jacoco.csv", encoding: "UTF-8"
+//      xml  destfile: "${outputPath}/jacoco.xml", encoding: "UTF-8"
+//      html destdir:  outputPath, encoding: "UTF-8", locale: "en", footer: "Qi4j SDK"
+//    }
+//  }
+//  inputs.dir coveredProjects.collect { p -> "${p.buildDir.path}/jacoco" }
+//  outputs.dir outputPath
+//}
 
 
 // Build the whole SDK public Javadoc

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/Qi4j.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/Qi4j.java b/core/api/src/main/java/org/qi4j/api/Qi4j.java
index 317153c..116cbef 100644
--- a/core/api/src/main/java/org/qi4j/api/Qi4j.java
+++ b/core/api/src/main/java/org/qi4j/api/Qi4j.java
@@ -16,6 +16,7 @@ package org.qi4j.api;
 import java.lang.reflect.Field;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Proxy;
+import java.util.function.Function;
 import org.qi4j.api.association.AbstractAssociation;
 import org.qi4j.api.association.AssociationDescriptor;
 import org.qi4j.api.composite.Composite;
@@ -30,7 +31,6 @@ import org.qi4j.api.property.PropertyDescriptor;
 import org.qi4j.api.service.ServiceDescriptor;
 import org.qi4j.api.structure.Module;
 import org.qi4j.api.value.ValueDescriptor;
-import org.qi4j.functional.Function;
 
 /**
  * Encapsulation of the Qi4j API.
@@ -126,10 +126,10 @@ public interface Qi4j
     /**
      * Function that returns the CompositeDescriptor of a Composite.
      */
-    Function<Composite, CompositeDescriptor> FUNCTION_DESCRIPTOR_FOR = new Function<Composite, CompositeDescriptor>()
+    Function<Composite, CompositeDescriptor> FUNCTION_DESCRIPTOR_FOR = new Function<Composite,CompositeDescriptor>()
     {
         @Override
-        public CompositeDescriptor map( Composite composite )
+        public CompositeDescriptor apply( Composite composite )
         {
             if( composite instanceof Proxy )
             {
@@ -158,7 +158,7 @@ public interface Qi4j
     Function<Composite, CompositeInstance> FUNCTION_COMPOSITE_INSTANCE_OF = new Function<Composite, CompositeInstance>()
     {
         @Override
-        public CompositeInstance map( Composite composite )
+        public CompositeInstance apply( Composite composite )
         {
             if( composite instanceof Proxy )
             {

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/common/MetaInfo.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/common/MetaInfo.java b/core/api/src/main/java/org/qi4j/api/common/MetaInfo.java
index b746711..9fd084c 100644
--- a/core/api/src/main/java/org/qi4j/api/common/MetaInfo.java
+++ b/core/api/src/main/java/org/qi4j/api/common/MetaInfo.java
@@ -110,7 +110,7 @@ public final class MetaInfo
             Iterable<Type> types = typesOf( metaInfoclass );
             for( Type type : types )
             {
-                metaInfoMap.put( Classes.RAW_CLASS.map( type ), metaInfo );
+                metaInfoMap.put( Classes.RAW_CLASS.apply( type ), metaInfo );
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/common/TypeName.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/common/TypeName.java b/core/api/src/main/java/org/qi4j/api/common/TypeName.java
index df9d6c5..c351b8a 100644
--- a/core/api/src/main/java/org/qi4j/api/common/TypeName.java
+++ b/core/api/src/main/java/org/qi4j/api/common/TypeName.java
@@ -21,7 +21,7 @@ public final class TypeName
 
     public static TypeName nameOf( Type type )
     {
-        return nameOf( Classes.RAW_CLASS.map( type ) );
+        return nameOf( Classes.RAW_CLASS.apply( type ) );
     }
 
     public static TypeName nameOf( String typeName )

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/common/UseDefaults.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/common/UseDefaults.java b/core/api/src/main/java/org/qi4j/api/common/UseDefaults.java
index 0f61ea1..859d469 100644
--- a/core/api/src/main/java/org/qi4j/api/common/UseDefaults.java
+++ b/core/api/src/main/java/org/qi4j/api/common/UseDefaults.java
@@ -46,7 +46,7 @@ import java.lang.annotation.Target;
  * </p>
  * <p>
  * It is also possible to change the default values for Composites during the assembly. This is done by calling the
- * {@link org.qi4j.bootstrap.ModuleAssembly#forMixin(Class)} method.
+ * {@code org.qi4j.bootstrap.ModuleAssembly#forMixin(Class)} method.
  * </p>
  * <p>
  * Example;

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/composite/CompositeContext.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/composite/CompositeContext.java b/core/api/src/main/java/org/qi4j/api/composite/CompositeContext.java
index d8a2aa7..fc1cd05 100644
--- a/core/api/src/main/java/org/qi4j/api/composite/CompositeContext.java
+++ b/core/api/src/main/java/org/qi4j/api/composite/CompositeContext.java
@@ -52,7 +52,7 @@ public class CompositeContext<T extends TransientComposite>
     {
         TransientComposite composite = get();
 
-        Iterable<Class<?>> types = Qi4j.FUNCTION_COMPOSITE_INSTANCE_OF.map( composite ).types();
+        Iterable<Class<?>> types = Qi4j.FUNCTION_COMPOSITE_INSTANCE_OF.apply( composite ).types();
         return (T) Proxy.newProxyInstance(
             composite.getClass().getClassLoader(),
             toArray( Class.class, Iterables.<Class>cast( types ) ),

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/composite/PropertyMapper.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/composite/PropertyMapper.java b/core/api/src/main/java/org/qi4j/api/composite/PropertyMapper.java
index 3543260..a47db83 100644
--- a/core/api/src/main/java/org/qi4j/api/composite/PropertyMapper.java
+++ b/core/api/src/main/java/org/qi4j/api/composite/PropertyMapper.java
@@ -113,7 +113,7 @@ public final class PropertyMapper
             {
                 strategy = STRATEGY.get( Array.class );
             }
-            else if( Enum.class.isAssignableFrom( Classes.RAW_CLASS.map( propertyType ) ) )
+            else if( Enum.class.isAssignableFrom( Classes.RAW_CLASS.apply( propertyType ) ) )
             {
                 strategy = STRATEGY.get( Enum.class );
             }
@@ -444,7 +444,7 @@ public final class PropertyMapper
         @SuppressWarnings( "unchecked" )
         public Object map( Composite composite, Type type, String value )
         {
-            return Qi4j.FUNCTION_COMPOSITE_INSTANCE_OF.map( composite ).module().newValueFromSerializedState( (Class<Object>) type, value );
+            return Qi4j.FUNCTION_COMPOSITE_INSTANCE_OF.apply( composite ).module().newValueFromSerializedState( (Class<Object>) type, value );
         }
     }
 

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/configuration/Configuration.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/configuration/Configuration.java b/core/api/src/main/java/org/qi4j/api/configuration/Configuration.java
index 52ec60f..966da22 100644
--- a/core/api/src/main/java/org/qi4j/api/configuration/Configuration.java
+++ b/core/api/src/main/java/org/qi4j/api/configuration/Configuration.java
@@ -52,7 +52,7 @@ import static org.qi4j.functional.Iterables.first;
  * <p>
  * If a new Configuration instance is created then it will be populated with properties
  * from the properties file whose filesystem name is the same as the identity (e.g. "MyService.properties").
- * If a service is not given a name via the {@link org.qi4j.bootstrap.ServiceDeclaration#identifiedBy(String)}, the
+ * If a service is not given a name via the {@code org.qi4j.bootstrap.ServiceDeclaration#identifiedBy(String)}, the
  * name will default to the FQCN of the ServiceComposite type.
  * </p>
  * <p>
@@ -128,7 +128,7 @@ public interface Configuration<T>
 
     /**
      * Updates the values of the managed user ConfigurationComposite instance from the underlying
-     * {@link org.qi4j.spi.entitystore.EntityStore}.  Any modified values in the current user configuration that
+     * {@code org.qi4j.spi.entitystore.EntityStore}.  Any modified values in the current user configuration that
      * has not been saved, via {@link #save()} method, will be lost.
      */
     void refresh();

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/constraint/ConstraintViolationException.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/constraint/ConstraintViolationException.java b/core/api/src/main/java/org/qi4j/api/constraint/ConstraintViolationException.java
index 28e41b3..9697a8b 100644
--- a/core/api/src/main/java/org/qi4j/api/constraint/ConstraintViolationException.java
+++ b/core/api/src/main/java/org/qi4j/api/constraint/ConstraintViolationException.java
@@ -25,9 +25,9 @@ import java.util.Collection;
 import java.util.Locale;
 import java.util.MissingResourceException;
 import java.util.ResourceBundle;
+import java.util.function.Function;
 import org.qi4j.api.Qi4j;
 import org.qi4j.api.composite.Composite;
-import org.qi4j.functional.Function;
 import org.qi4j.functional.Iterables;
 
 /**
@@ -54,7 +54,7 @@ public class ConstraintViolationException
                                          Collection<ConstraintViolation> constraintViolations
     )
     {
-        this( instance.toString(), Qi4j.FUNCTION_DESCRIPTOR_FOR.map( instance ).types(), method, constraintViolations );
+        this( instance.toString(), Qi4j.FUNCTION_DESCRIPTOR_FOR.apply( instance ).types(), method, constraintViolations );
     }
 
     public ConstraintViolationException( String instanceToString,
@@ -191,7 +191,7 @@ public class ConstraintViolationException
                 classes = "[" + Iterables.<Class<?>>toString( instanceTypes, new Function<Class<?>, String>()
                 {
                     @Override
-                    public String map( Class<?> from )
+                    public String apply( Class<?> from )
                     {
                         return from.getSimpleName();
                     }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/dataset/DataSet.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/dataset/DataSet.java b/core/api/src/main/java/org/qi4j/api/dataset/DataSet.java
index c62db9c..e194424 100644
--- a/core/api/src/main/java/org/qi4j/api/dataset/DataSet.java
+++ b/core/api/src/main/java/org/qi4j/api/dataset/DataSet.java
@@ -1,7 +1,7 @@
 package org.qi4j.api.dataset;
 
-import org.qi4j.functional.Function;
-import org.qi4j.functional.Specification;
+import java.util.function.Function;
+import java.util.function.Predicate;
 
 /**
  * definition.constrain(entity(Person.class))
@@ -10,7 +10,7 @@ import org.qi4j.functional.Specification;
  */
 public interface DataSet<T>
 {
-    DataSet<T> constrain( Specification<T> selection );
+    DataSet<T> constrain( Predicate<T> selection );
 
     <U> DataSet<U> project( Function<T, U> conversion );
 

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/dataset/Query.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/dataset/Query.java b/core/api/src/main/java/org/qi4j/api/dataset/Query.java
index 651462f..5c4db0e 100644
--- a/core/api/src/main/java/org/qi4j/api/dataset/Query.java
+++ b/core/api/src/main/java/org/qi4j/api/dataset/Query.java
@@ -1,9 +1,9 @@
 package org.qi4j.api.dataset;
 
+import java.util.function.Predicate;
 import org.qi4j.api.property.Property;
 import org.qi4j.api.query.QueryException;
 import org.qi4j.api.query.QueryExecutionException;
-import org.qi4j.functional.Specification;
 import org.qi4j.functional.Visitor;
 
 /**
@@ -16,7 +16,7 @@ public interface Query<T>
         ASCENDING, DESCENDING
     }
 
-    Query filter( Specification<T> filter );
+    Query filter( Predicate<T> filter );
 
     Query orderBy( final Property<?> property, final Order order );
 

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/dataset/iterable/IterableDataSet.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/dataset/iterable/IterableDataSet.java b/core/api/src/main/java/org/qi4j/api/dataset/iterable/IterableDataSet.java
index 8808427..213763b 100644
--- a/core/api/src/main/java/org/qi4j/api/dataset/iterable/IterableDataSet.java
+++ b/core/api/src/main/java/org/qi4j/api/dataset/iterable/IterableDataSet.java
@@ -1,10 +1,10 @@
 package org.qi4j.api.dataset.iterable;
 
+import java.util.function.Function;
+import java.util.function.Predicate;
 import org.qi4j.api.dataset.DataSet;
 import org.qi4j.api.dataset.Query;
-import org.qi4j.functional.Function;
 import org.qi4j.functional.Iterables;
-import org.qi4j.functional.Specification;
 
 /**
  * TODO
@@ -20,7 +20,7 @@ public class IterableDataSet<T>
     }
 
     @Override
-    public DataSet<T> constrain( Specification<T> selection )
+    public DataSet<T> constrain( Predicate<T> selection )
     {
         return new IterableDataSet<T>( Iterables.filter( selection, iterable ) );
     }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/dataset/iterable/IterableQuery.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/dataset/iterable/IterableQuery.java b/core/api/src/main/java/org/qi4j/api/dataset/iterable/IterableQuery.java
index d63e6f8..7e67184 100644
--- a/core/api/src/main/java/org/qi4j/api/dataset/iterable/IterableQuery.java
+++ b/core/api/src/main/java/org/qi4j/api/dataset/iterable/IterableQuery.java
@@ -2,11 +2,11 @@ package org.qi4j.api.dataset.iterable;
 
 import java.util.HashMap;
 import java.util.Map;
+import java.util.function.Predicate;
 import org.qi4j.api.dataset.Query;
 import org.qi4j.api.property.Property;
 import org.qi4j.api.query.QueryException;
 import org.qi4j.functional.Iterables;
-import org.qi4j.functional.Specification;
 import org.qi4j.functional.Visitor;
 
 /**
@@ -25,7 +25,7 @@ public class IterableQuery<T> implements Query<T>
     }
 
     @Override
-    public Query filter( Specification<T> filter )
+    public Query filter( Predicate<T> filter )
     {
         iterable = Iterables.filter( filter, iterable );
 

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/NotQueryableException.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/NotQueryableException.java b/core/api/src/main/java/org/qi4j/api/query/NotQueryableException.java
index 74737eb..0a29086 100644
--- a/core/api/src/main/java/org/qi4j/api/query/NotQueryableException.java
+++ b/core/api/src/main/java/org/qi4j/api/query/NotQueryableException.java
@@ -57,7 +57,7 @@ public class NotQueryableException
             throw new NotQueryableException(
                 String.format(
                     "%1$s \"%2$s\" (%3$s) is not queryable as has been marked with @Queryable(false)",
-                    Classes.RAW_CLASS.map( GenericPropertyInfo.propertyTypeOf( accessor ) ).getSimpleName(),
+                    Classes.RAW_CLASS.apply( GenericPropertyInfo.propertyTypeOf( accessor ) ).getSimpleName(),
                     ( (Member) accessor ).getName(),
                     ( (Member) accessor ).getDeclaringClass().getName()
                 )

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/QueryBuilder.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/QueryBuilder.java b/core/api/src/main/java/org/qi4j/api/query/QueryBuilder.java
index c07552c..2325c33 100644
--- a/core/api/src/main/java/org/qi4j/api/query/QueryBuilder.java
+++ b/core/api/src/main/java/org/qi4j/api/query/QueryBuilder.java
@@ -19,8 +19,8 @@
  */
 package org.qi4j.api.query;
 
+import java.util.function.Predicate;
 import org.qi4j.api.composite.Composite;
-import org.qi4j.functional.Specification;
 
 /**
  * QueryBuilders are used to create {@link Query} instances.
@@ -43,7 +43,7 @@ public interface QueryBuilder<T>
      *
      * @return a new builder with the added where-clause
      */
-    QueryBuilder<T> where( Specification<Composite> specification );
+    QueryBuilder<T> where( Predicate<Composite> specification );
 
     /**
      * Create a new query with the declared where-clauses that will be evaluated against the iterable entries.

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/QueryExpressions.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/QueryExpressions.java b/core/api/src/main/java/org/qi4j/api/query/QueryExpressions.java
index 75276a0..8cf266e 100644
--- a/core/api/src/main/java/org/qi4j/api/query/QueryExpressions.java
+++ b/core/api/src/main/java/org/qi4j/api/query/QueryExpressions.java
@@ -28,6 +28,7 @@ import java.lang.reflect.Proxy;
 import java.lang.reflect.Type;
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.function.Predicate;
 import org.qi4j.api.association.Association;
 import org.qi4j.api.association.GenericAssociationInfo;
 import org.qi4j.api.association.ManyAssociation;
@@ -64,7 +65,6 @@ import org.qi4j.api.query.grammar.PropertyNullSpecification;
 import org.qi4j.api.query.grammar.PropertyReference;
 import org.qi4j.api.query.grammar.Variable;
 import org.qi4j.api.util.NullArgumentException;
-import org.qi4j.functional.Specification;
 
 import static org.qi4j.functional.Iterables.first;
 import static org.qi4j.functional.Iterables.prepend;
@@ -300,9 +300,9 @@ public final class QueryExpressions
      * @return a new AND specification
      */
     @SafeVarargs
-    public static AndSpecification and( Specification<Composite> left,
-                                        Specification<Composite> right,
-                                        Specification<Composite>... optionalRight
+    public static AndSpecification and( Predicate<Composite> left,
+                                        Predicate<Composite> right,
+                                        Predicate<Composite>... optionalRight
     )
     {
         return new AndSpecification( prepend( left, prepend( right, Arrays.asList( optionalRight ) ) ) );
@@ -316,7 +316,7 @@ public final class QueryExpressions
      * @return a new OR specification
      */
     @SafeVarargs
-    public static OrSpecification or( Specification<Composite>... specs )
+    public static OrSpecification or( Predicate<Composite>... specs )
     {
         return new OrSpecification( Arrays.asList( specs ) );
     }
@@ -328,7 +328,7 @@ public final class QueryExpressions
      *
      * @return a new NOT specification
      */
-    public static NotSpecification not( Specification<Composite> operand )
+    public static NotSpecification not( Predicate<Composite> operand )
     {
         return new NotSpecification( operand );
     }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/AndSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/AndSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/AndSpecification.java
index 9644235..557fe0a 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/AndSpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/AndSpecification.java
@@ -1,7 +1,7 @@
 package org.qi4j.api.query.grammar;
 
+import java.util.function.Predicate;
 import org.qi4j.api.composite.Composite;
-import org.qi4j.functional.Specification;
 import org.qi4j.functional.Specifications;
 
 /**
@@ -11,15 +11,15 @@ public class AndSpecification
     extends BinarySpecification
 {
 
-    public AndSpecification( Iterable<Specification<Composite>> operands )
+    public AndSpecification( Iterable<Predicate<Composite>> operands )
     {
         super( operands );
     }
 
     @Override
-    public boolean satisfiedBy( Composite item )
+    public boolean test( Composite item )
     {
-        return Specifications.and( operands ).satisfiedBy( item );
+        return Specifications.and( operands ).test( item );
     }
 
     @Override
@@ -27,7 +27,7 @@ public class AndSpecification
     {
         StringBuilder sb = new StringBuilder( "(" );
         String and = "";
-        for( Specification<Composite> operand : operands )
+        for( Predicate<Composite> operand : operands )
         {
             sb.append( and ).append( operand );
             and = " and ";

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/AssociationFunction.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/AssociationFunction.java b/core/api/src/main/java/org/qi4j/api/query/grammar/AssociationFunction.java
index ee423a0..7978a62 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/AssociationFunction.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/AssociationFunction.java
@@ -22,6 +22,7 @@ import java.lang.reflect.AccessibleObject;
 import java.lang.reflect.Member;
 import java.lang.reflect.Proxy;
 import java.lang.reflect.Type;
+import java.util.function.Function;
 import org.qi4j.api.association.Association;
 import org.qi4j.api.association.AssociationStateHolder;
 import org.qi4j.api.association.GenericAssociationInfo;
@@ -31,7 +32,6 @@ import org.qi4j.api.composite.Composite;
 import org.qi4j.api.composite.CompositeInstance;
 import org.qi4j.api.query.QueryExpressionException;
 import org.qi4j.api.util.Classes;
-import org.qi4j.functional.Function;
 
 import static org.qi4j.api.util.Classes.typeOf;
 
@@ -58,9 +58,9 @@ public class AssociationFunction<T>
         this.accessor = accessor;
 
         Type returnType = typeOf( accessor );
-        if( !Association.class.isAssignableFrom( Classes.RAW_CLASS.map( returnType ) )
-            && !ManyAssociation.class.isAssignableFrom( Classes.RAW_CLASS.map( returnType ) )
-            && !NamedAssociation.class.isAssignableFrom( Classes.RAW_CLASS.map( returnType ) ) )
+        if( !Association.class.isAssignableFrom( Classes.RAW_CLASS.apply( returnType ) )
+            && !ManyAssociation.class.isAssignableFrom( Classes.RAW_CLASS.apply( returnType ) )
+            && !NamedAssociation.class.isAssignableFrom( Classes.RAW_CLASS.apply( returnType ) ) )
         {
             throw new QueryExpressionException( "Unsupported association type:" + returnType );
         }
@@ -92,14 +92,14 @@ public class AssociationFunction<T>
     }
 
     @Override
-    public Association<T> map( Composite entity )
+    public Association<T> apply( Composite entity )
     {
         try
         {
             Object target = entity;
             if( traversedAssociation != null )
             {
-                Association<?> association = traversedAssociation.map( entity );
+                Association<?> association = traversedAssociation.apply( entity );
                 if( association == null )
                 {
                     return null;

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/AssociationNotNullSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/AssociationNotNullSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/AssociationNotNullSpecification.java
index 86797df..f0a38c0 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/AssociationNotNullSpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/AssociationNotNullSpecification.java
@@ -1,5 +1,6 @@
 package org.qi4j.api.query.grammar;
 
+import java.util.function.Predicate;
 import org.qi4j.api.association.Association;
 import org.qi4j.api.composite.Composite;
 
@@ -7,7 +8,7 @@ import org.qi4j.api.composite.Composite;
  * Association not null Specification.
  */
 public class AssociationNotNullSpecification<T>
-    extends ExpressionSpecification
+    implements Predicate<Composite>
 {
     private AssociationFunction<T> association;
 
@@ -22,11 +23,11 @@ public class AssociationNotNullSpecification<T>
     }
 
     @Override
-    public boolean satisfiedBy( Composite item )
+    public boolean test( Composite item )
     {
         try
         {
-            Association<T> assoc = association.map( item );
+            Association<T> assoc = association.apply( item );
 
             if( assoc == null )
             {

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/AssociationNullSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/AssociationNullSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/AssociationNullSpecification.java
index 5834d4b..be320c3 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/AssociationNullSpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/AssociationNullSpecification.java
@@ -1,5 +1,6 @@
 package org.qi4j.api.query.grammar;
 
+import java.util.function.Predicate;
 import org.qi4j.api.association.Association;
 import org.qi4j.api.composite.Composite;
 
@@ -7,7 +8,7 @@ import org.qi4j.api.composite.Composite;
  * Association null Specification.
  */
 public class AssociationNullSpecification<T>
-    extends ExpressionSpecification
+    implements Predicate<Composite>
 {
     private AssociationFunction<T> association;
 
@@ -22,11 +23,11 @@ public class AssociationNullSpecification<T>
     }
 
     @Override
-    public boolean satisfiedBy( Composite item )
+    public boolean test( Composite item )
     {
         try
         {
-            Association<T> assoc = association.map( item );
+            Association<T> assoc = association.apply( item );
 
             if( assoc == null )
             {

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/BinarySpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/BinarySpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/BinarySpecification.java
index f251f99..3480cb1 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/BinarySpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/BinarySpecification.java
@@ -1,22 +1,22 @@
 package org.qi4j.api.query.grammar;
 
+import java.util.function.Predicate;
 import org.qi4j.api.composite.Composite;
-import org.qi4j.functional.Specification;
 
 /**
  * Base binary Specification, used for AND and OR Specifications..
  */
 public abstract class BinarySpecification
-    extends ExpressionSpecification
+    implements Predicate<Composite>
 {
-    protected final Iterable<Specification<Composite>> operands;
+    protected final Iterable<Predicate<Composite>> operands;
 
-    protected BinarySpecification( Iterable<Specification<Composite>> operands )
+    protected BinarySpecification( Iterable<Predicate<Composite>> operands )
     {
         this.operands = operands;
     }
 
-    public Iterable<Specification<Composite>> operands()
+    public Iterable<Predicate<Composite>> operands()
     {
         return operands;
     }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/ComparisonSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/ComparisonSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/ComparisonSpecification.java
index b8c743e..29d2680 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/ComparisonSpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/ComparisonSpecification.java
@@ -1,5 +1,6 @@
 package org.qi4j.api.query.grammar;
 
+import java.util.function.Predicate;
 import org.qi4j.api.composite.Composite;
 import org.qi4j.api.property.Property;
 
@@ -7,7 +8,7 @@ import org.qi4j.api.property.Property;
  * Base comparison Specification.
  */
 public abstract class ComparisonSpecification<T>
-    extends ExpressionSpecification
+    implements Predicate<Composite>
 {
     protected final PropertyFunction<T> property;
     protected final T value;
@@ -24,11 +25,11 @@ public abstract class ComparisonSpecification<T>
     }
 
     @Override
-    public final boolean satisfiedBy( Composite item )
+    public final boolean test( Composite item )
     {
         try
         {
-            Property<T> prop = property.map( item );
+            Property<T> prop = property.apply( item );
 
             if( prop == null )
             {

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/ContainsAllSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/ContainsAllSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/ContainsAllSpecification.java
index adf9c76..7a814b8 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/ContainsAllSpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/ContainsAllSpecification.java
@@ -1,6 +1,7 @@
 package org.qi4j.api.query.grammar;
 
 import java.util.Collection;
+import java.util.function.Predicate;
 import org.qi4j.api.composite.Composite;
 import org.qi4j.functional.Iterables;
 
@@ -8,7 +9,7 @@ import org.qi4j.functional.Iterables;
  * Contains All Specification.
  */
 public class ContainsAllSpecification<T>
-    extends ExpressionSpecification
+    implements Predicate<Composite>
 {
     private PropertyFunction<? extends Collection<T>> collectionProperty;
     private Iterable<T> valueCollection;
@@ -32,9 +33,9 @@ public class ContainsAllSpecification<T>
     }
 
     @Override
-    public boolean satisfiedBy( Composite item )
+    public boolean test( Composite item )
     {
-        Collection<T> collection = collectionProperty.map( item ).get();
+        Collection<T> collection = collectionProperty.apply( item ).get();
 
         if( collection == null )
         {

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/ContainsSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/ContainsSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/ContainsSpecification.java
index 1622c52..aed36bf 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/ContainsSpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/ContainsSpecification.java
@@ -1,13 +1,14 @@
 package org.qi4j.api.query.grammar;
 
 import java.util.Collection;
+import java.util.function.Predicate;
 import org.qi4j.api.composite.Composite;
 
 /**
  * Contains Specification.
  */
 public class ContainsSpecification<T>
-    extends ExpressionSpecification
+    implements Predicate<Composite>
 {
     private PropertyFunction<? extends Collection<T>> collectionProperty;
     private T value;
@@ -29,9 +30,9 @@ public class ContainsSpecification<T>
     }
 
     @Override
-    public boolean satisfiedBy( Composite item )
+    public boolean test( Composite item )
     {
-        Collection<T> collection = collectionProperty.map( item ).get();
+        Collection<T> collection = collectionProperty.apply( item ).get();
 
         if( collection == null )
         {

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/ExpressionSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/ExpressionSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/ExpressionSpecification.java
deleted file mode 100644
index d1338a2..0000000
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/ExpressionSpecification.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.qi4j.api.query.grammar;
-
-import org.qi4j.api.composite.Composite;
-import org.qi4j.functional.Specification;
-
-import static org.qi4j.functional.Iterables.append;
-import static org.qi4j.functional.Iterables.iterable;
-
-/**
- * Base expression Specification.
- */
-public abstract class ExpressionSpecification
-    implements Specification<Composite>
-{
-
-    @SuppressWarnings( "unchecked" )
-    public AndSpecification and( Specification<Composite> specification )
-    {
-        if( this instanceof AndSpecification )
-        {
-            return new AndSpecification( append( specification, ( (AndSpecification) this ).operands() ) );
-        }
-        else
-        {
-            return new AndSpecification( iterable( this, specification ) );
-        }
-    }
-
-    @SuppressWarnings( "unchecked" )
-    public OrSpecification or( Specification<Composite> specification )
-    {
-        if( this instanceof OrSpecification )
-        {
-            return new OrSpecification( append( specification, ( (OrSpecification) this ).operands() ) );
-        }
-        else
-        {
-            return new OrSpecification( iterable( this, specification ) );
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/ManyAssociationContainsSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/ManyAssociationContainsSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/ManyAssociationContainsSpecification.java
index d8a6b2e..893a50b 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/ManyAssociationContainsSpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/ManyAssociationContainsSpecification.java
@@ -18,6 +18,7 @@
  */
 package org.qi4j.api.query.grammar;
 
+import java.util.function.Predicate;
 import org.qi4j.api.association.ManyAssociation;
 import org.qi4j.api.composite.Composite;
 
@@ -25,7 +26,7 @@ import org.qi4j.api.composite.Composite;
  * ManyAssociation Contains Specification.
  */
 public class ManyAssociationContainsSpecification<T>
-    extends ExpressionSpecification
+    implements Predicate<Composite>
 {
     private final ManyAssociationFunction<T> manyAssociationFunction;
     private final T value;
@@ -47,9 +48,9 @@ public class ManyAssociationContainsSpecification<T>
     }
 
     @Override
-    public boolean satisfiedBy( Composite item )
+    public boolean test( Composite item )
     {
-        ManyAssociation<T> collection = manyAssociationFunction.map( item );
+        ManyAssociation<T> collection = manyAssociationFunction.apply( item );
         if( collection == null )
         {
             return false;

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/ManyAssociationFunction.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/ManyAssociationFunction.java b/core/api/src/main/java/org/qi4j/api/query/grammar/ManyAssociationFunction.java
index e91cdeb..bac4163 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/ManyAssociationFunction.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/ManyAssociationFunction.java
@@ -21,11 +21,11 @@ package org.qi4j.api.query.grammar;
 import java.lang.reflect.AccessibleObject;
 import java.lang.reflect.Member;
 import java.lang.reflect.Proxy;
+import java.util.function.Function;
 import org.qi4j.api.association.AssociationStateHolder;
 import org.qi4j.api.association.ManyAssociation;
 import org.qi4j.api.composite.Composite;
 import org.qi4j.api.composite.CompositeInstance;
-import org.qi4j.functional.Function;
 
 /**
  * Function to get Entity ManyAssociations.
@@ -71,14 +71,14 @@ public class ManyAssociationFunction<T>
     }
 
     @Override
-    public ManyAssociation<T> map( Composite entity )
+    public ManyAssociation<T> apply( Composite entity )
     {
         try
         {
             Object target = entity;
             if( traversedAssociation != null )
             {
-                target = traversedAssociation.map( entity ).get();
+                target = traversedAssociation.apply( entity ).get();
             }
             if( traversedManyAssociation != null )
             {

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/MatchesSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/MatchesSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/MatchesSpecification.java
index 101d64d..50ccd40 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/MatchesSpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/MatchesSpecification.java
@@ -1,5 +1,6 @@
 package org.qi4j.api.query.grammar;
 
+import java.util.function.Predicate;
 import org.qi4j.api.composite.Composite;
 import org.qi4j.api.property.Property;
 
@@ -7,7 +8,7 @@ import org.qi4j.api.property.Property;
  * Regular expression match Specification.
  */
 public class MatchesSpecification
-    extends ExpressionSpecification
+    implements Predicate<Composite>
 {
     private PropertyFunction<String> property;
     private Object value;
@@ -40,9 +41,9 @@ public class MatchesSpecification
     }
 
     @Override
-    public boolean satisfiedBy( Composite item )
+    public boolean test( Composite item )
     {
-        Property<String> prop = property.map( item );
+        Property<String> prop = property.apply( item );
 
         if( prop == null )
         {

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/NamedAssociationContainsNameSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/NamedAssociationContainsNameSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/NamedAssociationContainsNameSpecification.java
index c20987e..a882d56 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/NamedAssociationContainsNameSpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/NamedAssociationContainsNameSpecification.java
@@ -18,6 +18,7 @@
  */
 package org.qi4j.api.query.grammar;
 
+import java.util.function.Predicate;
 import org.qi4j.api.association.NamedAssociation;
 import org.qi4j.api.composite.Composite;
 
@@ -25,7 +26,7 @@ import org.qi4j.api.composite.Composite;
  * NamedAssociation Contains Specification.
  */
 public class NamedAssociationContainsNameSpecification<T>
-    extends ExpressionSpecification
+    implements Predicate<Composite>
 {
     private final NamedAssociationFunction<T> namedAssociationFunction;
     private final String name;
@@ -47,9 +48,9 @@ public class NamedAssociationContainsNameSpecification<T>
     }
 
     @Override
-    public boolean satisfiedBy( Composite item )
+    public boolean test( Composite item )
     {
-        NamedAssociation<T> collection = namedAssociationFunction.map( item );
+        NamedAssociation<T> collection = namedAssociationFunction.apply( item );
         if( collection == null )
         {
             return false;

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/NamedAssociationContainsSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/NamedAssociationContainsSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/NamedAssociationContainsSpecification.java
index 22079aa..9e1082a 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/NamedAssociationContainsSpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/NamedAssociationContainsSpecification.java
@@ -18,6 +18,7 @@
  */
 package org.qi4j.api.query.grammar;
 
+import java.util.function.Predicate;
 import org.qi4j.api.association.NamedAssociation;
 import org.qi4j.api.composite.Composite;
 
@@ -25,7 +26,7 @@ import org.qi4j.api.composite.Composite;
  * NamedAssociation Contains Specification.
  */
 public class NamedAssociationContainsSpecification<T>
-    extends ExpressionSpecification
+    implements Predicate<Composite>
 {
     private final NamedAssociationFunction<T> namedAssociationFunction;
     private final T value;
@@ -47,9 +48,9 @@ public class NamedAssociationContainsSpecification<T>
     }
 
     @Override
-    public boolean satisfiedBy( Composite item )
+    public boolean test( Composite item )
     {
-        NamedAssociation<T> collection = namedAssociationFunction.map( item );
+        NamedAssociation<T> collection = namedAssociationFunction.apply( item );
         if( collection == null )
         {
             return false;

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/NamedAssociationFunction.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/NamedAssociationFunction.java b/core/api/src/main/java/org/qi4j/api/query/grammar/NamedAssociationFunction.java
index 3f7b8e3..44e651e 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/NamedAssociationFunction.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/NamedAssociationFunction.java
@@ -21,11 +21,11 @@ package org.qi4j.api.query.grammar;
 import java.lang.reflect.AccessibleObject;
 import java.lang.reflect.Member;
 import java.lang.reflect.Proxy;
+import java.util.function.Function;
 import org.qi4j.api.association.AssociationStateHolder;
 import org.qi4j.api.association.NamedAssociation;
 import org.qi4j.api.composite.Composite;
 import org.qi4j.api.composite.CompositeInstance;
-import org.qi4j.functional.Function;
 
 /**
  * Function to get Entity NamedAssociations.
@@ -71,14 +71,14 @@ public class NamedAssociationFunction<T>
     }
 
     @Override
-    public NamedAssociation<T> map( Composite entity )
+    public NamedAssociation<T> apply( Composite entity )
     {
         try
         {
             Object target = entity;
             if( traversedAssociation != null )
             {
-                target = traversedAssociation.map( entity ).get();
+                target = traversedAssociation.apply( entity ).get();
             }
             if( traversedManyAssociation != null )
             {

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/NotSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/NotSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/NotSpecification.java
index a17ea82..4efefb8 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/NotSpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/NotSpecification.java
@@ -1,30 +1,30 @@
 package org.qi4j.api.query.grammar;
 
+import java.util.function.Predicate;
 import org.qi4j.api.composite.Composite;
-import org.qi4j.functional.Specification;
 import org.qi4j.functional.Specifications;
 
 /**
  * NOT Specification.
  */
-public class NotSpecification implements Specification<Composite>
+public class NotSpecification implements Predicate<Composite>
 {
-    private Specification<Composite> operand;
+    private Predicate<Composite> operand;
 
-    public NotSpecification( Specification<Composite> operand )
+    public NotSpecification( Predicate<Composite> operand )
     {
         this.operand = operand;
     }
 
-    public Specification<Composite> operand()
+    public Predicate<Composite> operand()
     {
         return operand;
     }
 
     @Override
-    public boolean satisfiedBy( Composite item )
+    public boolean test( Composite item )
     {
-        return Specifications.not( operand ).satisfiedBy( item );
+        return Specifications.not( operand ).test( item );
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/OrSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/OrSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/OrSpecification.java
index 1c6454a..d9b4337 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/OrSpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/OrSpecification.java
@@ -1,7 +1,7 @@
 package org.qi4j.api.query.grammar;
 
+import java.util.function.Predicate;
 import org.qi4j.api.composite.Composite;
-import org.qi4j.functional.Specification;
 import org.qi4j.functional.Specifications;
 
 /**
@@ -11,15 +11,15 @@ public class OrSpecification
     extends BinarySpecification
 {
 
-    public OrSpecification( Iterable<Specification<Composite>> operands )
+    public OrSpecification( Iterable<Predicate<Composite>> operands )
     {
         super( operands );
     }
 
     @Override
-    public boolean satisfiedBy( Composite item )
+    public boolean test( Composite item )
     {
-        return Specifications.or( operands ).satisfiedBy( item );
+        return Specifications.or( operands ).test( item );
     }
 
     @Override
@@ -27,7 +27,7 @@ public class OrSpecification
     {
         StringBuilder sb = new StringBuilder( "(" );
         String or = "";
-        for( Specification<Composite> operand : operands )
+        for( Predicate<Composite> operand : operands )
         {
             sb.append( or ).append( operand );
             or = " or ";

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/PropertyFunction.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/PropertyFunction.java b/core/api/src/main/java/org/qi4j/api/query/grammar/PropertyFunction.java
index b3f4c37..3ed7b8c 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/PropertyFunction.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/PropertyFunction.java
@@ -23,6 +23,7 @@ import java.lang.reflect.Member;
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Proxy;
 import java.lang.reflect.Type;
+import java.util.function.Function;
 import org.qi4j.api.association.Association;
 import org.qi4j.api.composite.Composite;
 import org.qi4j.api.composite.CompositeInstance;
@@ -31,7 +32,6 @@ import org.qi4j.api.property.Property;
 import org.qi4j.api.query.NotQueryableException;
 import org.qi4j.api.query.QueryExpressionException;
 import org.qi4j.api.util.Classes;
-import org.qi4j.functional.Function;
 
 import static org.qi4j.api.util.Classes.typeOf;
 
@@ -65,7 +65,7 @@ public class PropertyFunction<T>
         // Verify that the property type itself (value composites) is not marked as non queryable
 
         Type returnType = typeOf( accessor );
-        if( !Property.class.isAssignableFrom( Classes.RAW_CLASS.map( returnType ) ) )
+        if( !Property.class.isAssignableFrom( Classes.RAW_CLASS.apply( returnType ) ) )
         {
             throw new QueryExpressionException( "Not a property type:" + returnType );
         }
@@ -110,14 +110,14 @@ public class PropertyFunction<T>
     }
 
     @Override
-    public Property<T> map( Composite entity )
+    public Property<T> apply( Composite entity )
     {
         try
         {
             Object target = entity;
             if( traversedProperty != null )
             {
-                Property<?> property = traversedProperty.map( entity );
+                Property<?> property = traversedProperty.apply( entity );
                 if( property == null )
                 {
                     return null;
@@ -126,7 +126,7 @@ public class PropertyFunction<T>
             }
             else if( traversedAssociation != null )
             {
-                Association<?> association = traversedAssociation.map( entity );
+                Association<?> association = traversedAssociation.apply( entity );
                 if( association == null )
                 {
                     return null;

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/PropertyNotNullSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/PropertyNotNullSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/PropertyNotNullSpecification.java
index d92bb02..513e99a 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/PropertyNotNullSpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/PropertyNotNullSpecification.java
@@ -1,5 +1,6 @@
 package org.qi4j.api.query.grammar;
 
+import java.util.function.Predicate;
 import org.qi4j.api.composite.Composite;
 import org.qi4j.api.property.Property;
 
@@ -7,7 +8,7 @@ import org.qi4j.api.property.Property;
  * Property not null Specification.
  */
 public class PropertyNotNullSpecification<T>
-    extends ExpressionSpecification
+    implements Predicate<Composite>
 {
     private PropertyFunction<T> property;
 
@@ -22,9 +23,9 @@ public class PropertyNotNullSpecification<T>
     }
 
     @Override
-    public boolean satisfiedBy( Composite item )
+    public boolean test( Composite item )
     {
-        Property<T> prop = property.map( item );
+        Property<T> prop = property.apply( item );
 
         if( prop == null )
         {

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/PropertyNullSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/PropertyNullSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/PropertyNullSpecification.java
index 65b33b5..b7989c6 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/PropertyNullSpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/PropertyNullSpecification.java
@@ -1,5 +1,6 @@
 package org.qi4j.api.query.grammar;
 
+import java.util.function.Predicate;
 import org.qi4j.api.composite.Composite;
 import org.qi4j.api.property.Property;
 
@@ -7,7 +8,7 @@ import org.qi4j.api.property.Property;
  * Property null Specification.
  */
 public class PropertyNullSpecification<T>
-    extends ExpressionSpecification
+    implements Predicate<Composite>
 {
     private PropertyFunction<T> property;
 
@@ -22,9 +23,9 @@ public class PropertyNullSpecification<T>
     }
 
     @Override
-    public boolean satisfiedBy( Composite item )
+    public boolean test( Composite item )
     {
-        Property<T> prop = property.map( item );
+        Property<T> prop = property.apply( item );
 
         if( prop == null )
         {

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/PropertyReference.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/PropertyReference.java b/core/api/src/main/java/org/qi4j/api/query/grammar/PropertyReference.java
index 9b8f73d..0f51f2f 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/PropertyReference.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/PropertyReference.java
@@ -1,8 +1,8 @@
 package org.qi4j.api.query.grammar;
 
+import java.util.function.Function;
 import org.qi4j.api.composite.Composite;
 import org.qi4j.api.property.Property;
-import org.qi4j.functional.Function;
 
 /**
  * Property Reference.

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/query/grammar/QuerySpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/QuerySpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/QuerySpecification.java
index cdc3861..eb92463 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/QuerySpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/QuerySpecification.java
@@ -1,16 +1,16 @@
 package org.qi4j.api.query.grammar;
 
+import java.util.function.Predicate;
 import org.qi4j.api.composite.Composite;
-import org.qi4j.functional.Specification;
 
 /**
  * This should be used when doing native queries, such as SQL, SPARQL or similar. EntityFinders can choose
  * what type of query languages they can understand by checking the language property of a QuerySpecification
  */
 public class QuerySpecification
-    implements Specification<Composite>
+    implements Predicate<Composite>
 {
-    public static boolean isQueryLanguage( String language, Specification<Composite> specification )
+    public static boolean isQueryLanguage( String language, Predicate<Composite> specification )
     {
         if( !( specification instanceof QuerySpecification ) )
         {
@@ -40,7 +40,7 @@ public class QuerySpecification
     }
 
     @Override
-    public boolean satisfiedBy( Composite item )
+    public boolean test( Composite item )
     {
         return false;
     }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/service/importer/InstanceImporter.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/service/importer/InstanceImporter.java b/core/api/src/main/java/org/qi4j/api/service/importer/InstanceImporter.java
index 38901fb..1e6058c 100644
--- a/core/api/src/main/java/org/qi4j/api/service/importer/InstanceImporter.java
+++ b/core/api/src/main/java/org/qi4j/api/service/importer/InstanceImporter.java
@@ -14,6 +14,7 @@
 
 package org.qi4j.api.service.importer;
 
+import java.util.function.Function;
 import org.qi4j.api.injection.scope.Structure;
 import org.qi4j.api.service.ImportedServiceDescriptor;
 import org.qi4j.api.service.ServiceImporter;
@@ -22,7 +23,6 @@ import org.qi4j.api.structure.Application;
 import org.qi4j.api.structure.Layer;
 import org.qi4j.api.structure.MetaInfoHolder;
 import org.qi4j.api.structure.Module;
-import org.qi4j.functional.Function;
 import org.qi4j.functional.Iterables;
 
 import static org.qi4j.functional.Iterables.filter;
@@ -58,7 +58,7 @@ public final class InstanceImporter<T>
             {
                 @Override
                 @SuppressWarnings( "unchecked" )
-                public T map( Class<?> type )
+                public T apply( Class<?> type )
                 {
                     return (T) metaInfoHolder.metaInfo( type );
                 }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/service/importer/ServiceSelectorImporter.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/service/importer/ServiceSelectorImporter.java b/core/api/src/main/java/org/qi4j/api/service/importer/ServiceSelectorImporter.java
index ad3c757..6fddf2b 100644
--- a/core/api/src/main/java/org/qi4j/api/service/importer/ServiceSelectorImporter.java
+++ b/core/api/src/main/java/org/qi4j/api/service/importer/ServiceSelectorImporter.java
@@ -16,6 +16,7 @@ package org.qi4j.api.service.importer;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.function.Predicate;
 import org.qi4j.api.injection.scope.Structure;
 import org.qi4j.api.service.Availability;
 import org.qi4j.api.service.ImportedServiceDescriptor;
@@ -25,7 +26,6 @@ import org.qi4j.api.service.ServiceImporterException;
 import org.qi4j.api.service.ServiceReference;
 import org.qi4j.api.service.qualifier.ServiceQualifier;
 import org.qi4j.functional.Iterables;
-import org.qi4j.functional.Specification;
 
 /**
  * If several services are available with a given type, and you want to constrain
@@ -47,13 +47,13 @@ public final class ServiceSelectorImporter<T>
     public T importService( ImportedServiceDescriptor serviceDescriptor )
         throws ServiceImporterException
     {
-        Specification<ServiceReference<?>> selector = serviceDescriptor.metaInfo( Specification.class );
+        Predicate<ServiceReference<?>> selector = serviceDescriptor.metaInfo( Predicate.class );
         Class serviceType = Iterables.first( serviceDescriptor.types() );
         Iterable<ServiceReference<T>> services = locator.findServices( serviceType );
         List<ServiceReference<T>> filteredServices = new ArrayList<>();
         for( ServiceReference<T> service : services )
         {
-            Specification selector1 = service.metaInfo( Specification.class );
+            Predicate selector1 = service.metaInfo( Predicate.class );
             if( selector1 != null && selector1 == selector )
             {
                 continue;

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/service/qualifier/Active.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/service/qualifier/Active.java b/core/api/src/main/java/org/qi4j/api/service/qualifier/Active.java
index d06a749..5abfa3b 100644
--- a/core/api/src/main/java/org/qi4j/api/service/qualifier/Active.java
+++ b/core/api/src/main/java/org/qi4j/api/service/qualifier/Active.java
@@ -16,8 +16,8 @@ package org.qi4j.api.service.qualifier;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
+import java.util.function.Predicate;
 import org.qi4j.api.service.ServiceReference;
-import org.qi4j.functional.Specification;
 
 /**
  * Filter services based on whether they are active or not.
@@ -43,7 +43,7 @@ public @interface Active
         implements AnnotationQualifier<Active>
     {
         @Override
-        public <T> Specification<ServiceReference<?>> qualifier( Active active )
+        public <T> Predicate<ServiceReference<?>> qualifier( Active active )
         {
             return ServiceQualifier.whereActive();
         }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/service/qualifier/AnnotationQualifier.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/service/qualifier/AnnotationQualifier.java b/core/api/src/main/java/org/qi4j/api/service/qualifier/AnnotationQualifier.java
index 7187ed1..d73fae4 100644
--- a/core/api/src/main/java/org/qi4j/api/service/qualifier/AnnotationQualifier.java
+++ b/core/api/src/main/java/org/qi4j/api/service/qualifier/AnnotationQualifier.java
@@ -15,13 +15,13 @@
 package org.qi4j.api.service.qualifier;
 
 import java.lang.annotation.Annotation;
+import java.util.function.Predicate;
 import org.qi4j.api.service.ServiceReference;
-import org.qi4j.functional.Specification;
 
 /**
  * Constructs a Specification for a given qualifier annotation
  */
 public interface AnnotationQualifier<QUALIFIER extends Annotation>
 {
-    public <T> Specification<ServiceReference<?>> qualifier( QUALIFIER qualifier );
+    public <T> Predicate<ServiceReference<?>> qualifier( QUALIFIER qualifier );
 }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/service/qualifier/Available.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/service/qualifier/Available.java b/core/api/src/main/java/org/qi4j/api/service/qualifier/Available.java
index 894451d..a4dae9c 100644
--- a/core/api/src/main/java/org/qi4j/api/service/qualifier/Available.java
+++ b/core/api/src/main/java/org/qi4j/api/service/qualifier/Available.java
@@ -16,8 +16,8 @@ package org.qi4j.api.service.qualifier;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
+import java.util.function.Predicate;
 import org.qi4j.api.service.ServiceReference;
-import org.qi4j.functional.Specification;
 
 /**
  * Filter services based on whether they are available or not.
@@ -41,7 +41,7 @@ public @interface Available
         implements AnnotationQualifier<Available>
     {
         @Override
-        public <T> Specification<ServiceReference<?>> qualifier( Available active )
+        public <T> Predicate<ServiceReference<?>> qualifier( Available active )
         {
             return ServiceQualifier.whereAvailable();
         }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/service/qualifier/HasMetaInfo.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/service/qualifier/HasMetaInfo.java b/core/api/src/main/java/org/qi4j/api/service/qualifier/HasMetaInfo.java
index aac0702..196e2c8 100644
--- a/core/api/src/main/java/org/qi4j/api/service/qualifier/HasMetaInfo.java
+++ b/core/api/src/main/java/org/qi4j/api/service/qualifier/HasMetaInfo.java
@@ -16,8 +16,8 @@ package org.qi4j.api.service.qualifier;
 import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
+import java.util.function.Predicate;
 import org.qi4j.api.service.ServiceReference;
-import org.qi4j.functional.Specification;
 
 /**
  * Filter services based on Meta Info being declared on the Service.
@@ -68,13 +68,13 @@ public @interface HasMetaInfo
         implements AnnotationQualifier<HasMetaInfo>
     {
         @Override
-        public <T> Specification<ServiceReference<?>> qualifier( final HasMetaInfo hasMetaInfo )
+        public <T> Predicate<ServiceReference<?>> qualifier( final HasMetaInfo hasMetaInfo )
         {
-            return new Specification<ServiceReference<?>>()
+            return new Predicate<ServiceReference<?>>()
             {
                 @Override
                 @SuppressWarnings( {"raw", "unchecked"} )
-                public boolean satisfiedBy( ServiceReference<?> service )
+                public boolean test( ServiceReference<?> service )
                 {
                     for( Class metaInfoType : hasMetaInfo.value() )
                     {

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/9479a63e/core/api/src/main/java/org/qi4j/api/service/qualifier/IdentifiedBy.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/service/qualifier/IdentifiedBy.java b/core/api/src/main/java/org/qi4j/api/service/qualifier/IdentifiedBy.java
index 2c715d7..e8f2974 100644
--- a/core/api/src/main/java/org/qi4j/api/service/qualifier/IdentifiedBy.java
+++ b/core/api/src/main/java/org/qi4j/api/service/qualifier/IdentifiedBy.java
@@ -16,8 +16,8 @@ package org.qi4j.api.service.qualifier;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
+import java.util.function.Predicate;
 import org.qi4j.api.service.ServiceReference;
-import org.qi4j.functional.Specification;
 
 /**
  * Filter services based on identity. Identity can be set during assembly, like so:
@@ -45,7 +45,7 @@ public @interface IdentifiedBy
         implements AnnotationQualifier<IdentifiedBy>
     {
         @Override
-        public <T> Specification<ServiceReference<?>> qualifier( IdentifiedBy identifiedBy )
+        public <T> Predicate<ServiceReference<?>> qualifier( IdentifiedBy identifiedBy )
         {
             return ServiceQualifier.withId( identifiedBy.value() );
         }


Mime
View raw message