polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [02/24] zest-java git commit: ZEST-112, Replaced org.apache.zest.functional.Function and org.apache.zest.functional.Function2 with java.util.functional.Function and java.util.functional.BiFunction
Date Wed, 26 Aug 2015 15:45:05 GMT
http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/core/spi/src/main/java/org/apache/zest/spi/value/ValueDeserializerAdapter.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/apache/zest/spi/value/ValueDeserializerAdapter.java b/core/spi/src/main/java/org/apache/zest/spi/value/ValueDeserializerAdapter.java
index c22082d..43dbe37 100644
--- a/core/spi/src/main/java/org/apache/zest/spi/value/ValueDeserializerAdapter.java
+++ b/core/spi/src/main/java/org/apache/zest/spi/value/ValueDeserializerAdapter.java
@@ -32,6 +32,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Scanner;
 import java.util.Set;
+import java.util.function.BiFunction;
+import java.util.function.Function;
 import org.joda.time.DateTime;
 import org.joda.time.LocalDate;
 import org.joda.time.LocalDateTime;
@@ -55,8 +57,6 @@ import org.apache.zest.api.value.ValueBuilder;
 import org.apache.zest.api.value.ValueDescriptor;
 import org.apache.zest.api.value.ValueDeserializer;
 import org.apache.zest.api.value.ValueSerializationException;
-import org.apache.zest.functional.Function;
-import org.apache.zest.functional.Function2;
 
 import static org.apache.zest.functional.Iterables.empty;
 import static org.apache.zest.functional.Iterables.first;
@@ -154,7 +154,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
         registerDeserializer( String.class, new Function<Object, String>()
         {
             @Override
-            public String map( Object input )
+            public String apply( Object input )
             {
                 return input.toString();
             }
@@ -162,7 +162,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
         registerDeserializer( Character.class, new Function<Object, Character>()
         {
             @Override
-            public Character map( Object input )
+            public Character apply( Object input )
             {
                 return input.toString().charAt( 0 );
             }
@@ -171,7 +171,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
         {
             @SuppressWarnings( "UnnecessaryUnboxing" )
             @Override
-            public Boolean map( Object input )
+            public Boolean apply( Object input )
             {
                 return ( input instanceof String )
                        ? Boolean.parseBoolean( (String) input )
@@ -181,7 +181,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
         registerDeserializer( Integer.class, new Function<Object, Integer>()
         {
             @Override
-            public Integer map( Object input )
+            public Integer apply( Object input )
             {
                 return ( input instanceof String )
                        ? Integer.parseInt( (String) input )
@@ -191,7 +191,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
         registerDeserializer( Long.class, new Function<Object, Long>()
         {
             @Override
-            public Long map( Object input )
+            public Long apply( Object input )
             {
                 return ( input instanceof String )
                        ? Long.parseLong( (String) input )
@@ -201,7 +201,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
         registerDeserializer( Short.class, new Function<Object, Short>()
         {
             @Override
-            public Short map( Object input )
+            public Short apply( Object input )
             {
                 return ( input instanceof String )
                        ? Short.parseShort( (String) input )
@@ -211,7 +211,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
         registerDeserializer( Byte.class, new Function<Object, Byte>()
         {
             @Override
-            public Byte map( Object input )
+            public Byte apply( Object input )
             {
                 return ( input instanceof String )
                        ? Byte.parseByte( (String) input )
@@ -221,7 +221,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
         registerDeserializer( Float.class, new Function<Object, Float>()
         {
             @Override
-            public Float map( Object input )
+            public Float apply( Object input )
             {
                 return ( input instanceof String )
                        ? Float.parseFloat( (String) input )
@@ -231,7 +231,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
         registerDeserializer( Double.class, new Function<Object, Double>()
         {
             @Override
-            public Double map( Object input )
+            public Double apply( Object input )
             {
                 return ( input instanceof String )
                        ? Double.parseDouble( (String) input )
@@ -243,7 +243,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
         registerDeserializer( BigDecimal.class, new Function<Object, BigDecimal>()
         {
             @Override
-            public BigDecimal map( Object input )
+            public BigDecimal apply( Object input )
             {
                 return new BigDecimal( input.toString() );
             }
@@ -251,7 +251,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
         registerDeserializer( BigInteger.class, new Function<Object, BigInteger>()
         {
             @Override
-            public BigInteger map( Object input )
+            public BigInteger apply( Object input )
             {
                 return new BigInteger( input.toString() );
             }
@@ -261,7 +261,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
         registerDeserializer( Date.class, new Function<Object, Date>()
         {
             @Override
-            public Date map( Object input )
+            public Date apply( Object input )
             {
                 return Dates.fromString( input.toString() );
             }
@@ -269,7 +269,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
         registerDeserializer( DateTime.class, new Function<Object, DateTime>()
         {
             @Override
-            public DateTime map( Object input )
+            public DateTime apply( Object input )
             {
                 return DateTime.parse( input.toString() );
             }
@@ -277,7 +277,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
         registerDeserializer( LocalDateTime.class, new Function<Object, LocalDateTime>()
         {
             @Override
-            public LocalDateTime map( Object input )
+            public LocalDateTime apply( Object input )
             {
                 return new LocalDateTime( input );
             }
@@ -285,7 +285,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
         registerDeserializer( LocalDate.class, new Function<Object, LocalDate>()
         {
             @Override
-            public LocalDate map( Object input )
+            public LocalDate apply( Object input )
             {
                 return new LocalDate( input );
             }
@@ -295,7 +295,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
         registerDeserializer( EntityReference.class, new Function<Object, EntityReference>()
         {
             @Override
-            public EntityReference map( Object input )
+            public EntityReference apply( Object input )
             {
                 return EntityReference.parseEntityReference( input.toString() );
             }
@@ -318,7 +318,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
             }
             else
             {
-                valuesModule = valuesModuleFinder.map( application );
+                valuesModule = valuesModuleFinder.apply( application );
                 if( valuesModule == null )
                 {
                     throw new ValueSerializationException( "Values Module provided by the finder Function was null." );
@@ -350,7 +350,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
         return new Function<String, T>()
         {
             @Override
-            public T map( String input )
+            public T apply( String input )
             {
                 return deserialize( valueType, input );
             }
@@ -358,12 +358,12 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
     }
 
     @Override
-    public final <T> Function2<ValueType, String, T> deserialize()
+    public final <T> BiFunction<ValueType, String, T> deserialize()
     {
-        return new Function2<ValueType, String, T>()
+        return new BiFunction<ValueType, String, T>()
         {
             @Override
-            public T map( ValueType valueType, String input )
+            public T apply( ValueType valueType, String input )
             {
                 return deserialize( valueType, input );
             }
@@ -454,7 +454,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
                 return String.class.equals( type ) ? (T) "" : null;
             }
             String string = scanner.next();
-            return (T) deserializers.get( type ).map( string );
+            return (T) deserializers.get( type ).apply( string );
         }
         else // Array ValueType
         if( type.isArray() )
@@ -490,7 +490,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
             {
                 return null;
             }
-            return (T) deserializers.get( type ).map( value );
+            return (T) deserializers.get( type ).apply( value );
         }
         else if( complexDeserializers.get( type ) != null )
         {
@@ -530,7 +530,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
         return new Function<InputType, T>()
         {
             @Override
-            public T map( InputType input )
+            public T apply( InputType input )
             {
                 try
                 {
@@ -701,7 +701,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
         return new Function<InputNodeType, T>()
         {
             @Override
-            public T map( InputNodeType inputNode )
+            public T apply( InputNodeType inputNode )
             {
                 try
                 {
@@ -736,7 +736,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
             {
                 return null;
             }
-            return (T) deserializers.get( type ).map( value );
+            return (T) deserializers.get( type ).apply( value );
         }
         else if( complexDeserializers.get( type ) != null )
         {
@@ -786,7 +786,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
             new Function<PropertyDescriptor, Object>()
         {
             @Override
-            public Object map( PropertyDescriptor property )
+            public Object apply( PropertyDescriptor property )
             {
                 return stateMap.get( property.qualifiedName().name() );
             }
@@ -794,7 +794,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
             new Function<AssociationDescriptor, EntityReference>()
             {
                 @Override
-                public EntityReference map( AssociationDescriptor association )
+                public EntityReference apply( AssociationDescriptor association )
                 {
                     Object entityRef = stateMap.get( association.qualifiedName().name() );
                     if( entityRef == null )
@@ -808,7 +808,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
             {
                 @Override
                 @SuppressWarnings( "unchecked" )
-                public Iterable<EntityReference> map( AssociationDescriptor manyAssociation )
+                public Iterable<EntityReference> apply( AssociationDescriptor manyAssociation )
                 {
                     Object entityRefs = stateMap.get( manyAssociation.qualifiedName().name() );
                     if( entityRefs == null )
@@ -822,7 +822,7 @@ public abstract class ValueDeserializerAdapter<InputType, InputNodeType>
             {
                 @Override
                 @SuppressWarnings( "unchecked" )
-                public Map<String, EntityReference> map( AssociationDescriptor namedAssociation )
+                public Map<String, EntityReference> apply( AssociationDescriptor namedAssociation )
                 {
                     Object entityRefs = stateMap.get( namedAssociation.qualifiedName().name() );
                     if( entityRefs == null )

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/core/spi/src/main/java/org/apache/zest/spi/value/ValueSerializerAdapter.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/apache/zest/spi/value/ValueSerializerAdapter.java b/core/spi/src/main/java/org/apache/zest/spi/value/ValueSerializerAdapter.java
index 08e7d82..d9b2127 100644
--- a/core/spi/src/main/java/org/apache/zest/spi/value/ValueSerializerAdapter.java
+++ b/core/spi/src/main/java/org/apache/zest/spi/value/ValueSerializerAdapter.java
@@ -25,6 +25,8 @@ import java.math.BigInteger;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.function.BiFunction;
+import java.util.function.Function;
 import org.joda.time.DateTime;
 import org.joda.time.LocalDate;
 import org.joda.time.LocalDateTime;
@@ -45,8 +47,6 @@ import org.apache.zest.api.value.ValueComposite;
 import org.apache.zest.api.value.ValueDescriptor;
 import org.apache.zest.api.value.ValueSerializationException;
 import org.apache.zest.api.value.ValueSerializer;
-import org.apache.zest.functional.Function;
-import org.apache.zest.functional.Function2;
 
 import static org.apache.zest.functional.Iterables.first;
 
@@ -93,19 +93,19 @@ public abstract class ValueSerializerAdapter<OutputType>
 
     private static final String UTF_8 = "UTF-8";
 
-    private static <TO, FROM extends TO> Function2<Options, FROM, TO> identitySerializer()
+    private static <TO, FROM extends TO> BiFunction<Options, FROM, TO> identitySerializer()
     {
-        return new Function2<Options, FROM, TO>()
+        return new BiFunction<Options, FROM, TO>()
         {
             @Override
-            public TO map( Options options, FROM from )
+            public TO apply( Options options, FROM from )
             {
                 return from;
             }
         };
     }
 
-    private final Map<Class<?>, Function2<Options, Object, Object>> serializers = new HashMap<>( 16 );
+    private final Map<Class<?>, BiFunction<Options, Object, Object>> serializers = new HashMap<>( 16 );
     private final Map<Class<?>, ComplexSerializer<Object, OutputType>> complexSerializers = new HashMap<>( 2 );
 
     /**
@@ -116,9 +116,9 @@ public abstract class ValueSerializerAdapter<OutputType>
      * @param serializer Serialization Function
      */
     @SuppressWarnings( "unchecked" )
-    protected final <T> void registerSerializer( Class<T> type, Function2<Options, T, Object> serializer )
+    protected final <T> void registerSerializer( Class<T> type, BiFunction<Options, T, Object> serializer )
     {
-        serializers.put( type, (Function2<Options, Object, Object>) serializer );
+        serializers.put( type, (BiFunction<Options, Object, Object>) serializer );
     }
 
     /**
@@ -148,62 +148,62 @@ public abstract class ValueSerializerAdapter<OutputType>
         registerSerializer( Double.class, ValueSerializerAdapter.<Object, Double>identitySerializer() );
 
         // Number types
-        registerSerializer( BigDecimal.class, new Function2<Options, BigDecimal, Object>()
+        registerSerializer( BigDecimal.class, new BiFunction<Options, BigDecimal, Object>()
         {
             @Override
-            public Object map( Options options, BigDecimal bigDecimal )
+            public Object apply( Options options, BigDecimal bigDecimal )
             {
                 return bigDecimal.toString();
             }
         } );
-        registerSerializer( BigInteger.class, new Function2<Options, BigInteger, Object>()
+        registerSerializer( BigInteger.class, new BiFunction<Options, BigInteger, Object>()
         {
             @Override
-            public Object map( Options options, BigInteger bigInteger )
+            public Object apply( Options options, BigInteger bigInteger )
             {
                 return bigInteger.toString();
             }
         } );
 
         // Date types
-        registerSerializer( Date.class, new Function2<Options, Date, Object>()
+        registerSerializer( Date.class, new BiFunction<Options, Date, Object>()
         {
             @Override
-            public Object map( Options options, Date date )
+            public Object apply( Options options, Date date )
             {
                 return Dates.toUtcString( date );
             }
         } );
-        registerSerializer( DateTime.class, new Function2<Options, DateTime, Object>()
+        registerSerializer( DateTime.class, new BiFunction<Options, DateTime, Object>()
         {
             @Override
-            public Object map( Options options, DateTime date )
+            public Object apply( Options options, DateTime date )
             {
                 return date.toString();
             }
         } );
-        registerSerializer( LocalDateTime.class, new Function2<Options, LocalDateTime, Object>()
+        registerSerializer( LocalDateTime.class, new BiFunction<Options, LocalDateTime, Object>()
         {
             @Override
-            public Object map( Options options, LocalDateTime date )
+            public Object apply( Options options, LocalDateTime date )
             {
                 return date.toString();
             }
         } );
-        registerSerializer( LocalDate.class, new Function2<Options, LocalDate, Object>()
+        registerSerializer( LocalDate.class, new BiFunction<Options, LocalDate, Object>()
         {
             @Override
-            public Object map( Options options, LocalDate date )
+            public Object apply( Options options, LocalDate date )
             {
                 return date.toString();
             }
         } );
 
         // Other supported types
-        registerSerializer( EntityReference.class, new Function2<Options, EntityReference, Object>()
+        registerSerializer( EntityReference.class, new BiFunction<Options, EntityReference, Object>()
         {
             @Override
-            public Object map( Options options, EntityReference ref )
+            public Object apply( Options options, EntityReference ref )
             {
                 return ref.toString();
             }
@@ -216,7 +216,7 @@ public abstract class ValueSerializerAdapter<OutputType>
         return new Function<T, String>()
         {
             @Override
-            public String map( T object )
+            public String apply( T object )
             {
                 return serialize( object );
             }
@@ -229,7 +229,7 @@ public abstract class ValueSerializerAdapter<OutputType>
         return new Function<T, String>()
         {
             @Override
-            public String map( T object )
+            public String apply( T object )
             {
                 return serialize( options, object );
             }
@@ -243,7 +243,7 @@ public abstract class ValueSerializerAdapter<OutputType>
         return new Function<T, String>()
         {
             @Override
-            public String map( T object )
+            public String apply( T object )
             {
                 return serialize( includeTypeInfo ? new Options().withTypeInfo() : new Options().withoutTypeInfo(),
                                   object );
@@ -329,7 +329,7 @@ public abstract class ValueSerializerAdapter<OutputType>
             if( serializers.get( object.getClass() ) != null )
             {
                 // Plain Value
-                Object serialized = serializers.get( object.getClass() ).map( options, object );
+                Object serialized = serializers.get( object.getClass() ).apply( options, object );
                 output.write( serialized.toString().getBytes( UTF_8 ) );
             }
             else if( object.getClass().isEnum() )
@@ -364,7 +364,7 @@ public abstract class ValueSerializerAdapter<OutputType>
         else // Registered serializer
             if( serializers.get( object.getClass() ) != null )
             {
-                onValue( output, serializers.get( object.getClass() ).map( options, object ) );
+                onValue( output, serializers.get( object.getClass() ).apply( options, object ) );
             }
             else if( complexSerializers.get( object.getClass() ) != null )
             {
@@ -409,7 +409,7 @@ public abstract class ValueSerializerAdapter<OutputType>
     private void serializeValueComposite( Options options, Object object, OutputType output, boolean rootPass )
         throws Exception
     {
-        CompositeInstance valueInstance = ZestAPI.FUNCTION_COMPOSITE_INSTANCE_OF.map( (ValueComposite) object );
+        CompositeInstance valueInstance = ZestAPI.FUNCTION_COMPOSITE_INSTANCE_OF.apply( (ValueComposite) object );
         ValueDescriptor descriptor = (ValueDescriptor) valueInstance.descriptor();
         AssociationStateHolder state = (AssociationStateHolder) valueInstance.state();
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/core/spi/src/main/java/org/apache/zest/valueserialization/orgjson/OrgJsonValueDeserializer.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/apache/zest/valueserialization/orgjson/OrgJsonValueDeserializer.java b/core/spi/src/main/java/org/apache/zest/valueserialization/orgjson/OrgJsonValueDeserializer.java
index 1ea6110..6dd152e 100644
--- a/core/spi/src/main/java/org/apache/zest/valueserialization/orgjson/OrgJsonValueDeserializer.java
+++ b/core/spi/src/main/java/org/apache/zest/valueserialization/orgjson/OrgJsonValueDeserializer.java
@@ -22,6 +22,7 @@ import java.io.InputStreamReader;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.function.Function;
 import org.json.JSONArray;
 import org.json.JSONObject;
 import org.json.JSONTokener;
@@ -32,7 +33,6 @@ import org.apache.zest.api.structure.Application;
 import org.apache.zest.api.structure.Module;
 import org.apache.zest.api.value.ValueDeserializer;
 import org.apache.zest.api.value.ValueSerializationException;
-import org.apache.zest.functional.Function;
 import org.apache.zest.spi.value.ValueDeserializerAdapter;
 
 /**
@@ -139,7 +139,7 @@ public class OrgJsonValueDeserializer
             else
             {
                 input.back();
-                collection.add( deserializer.map( input ) );
+                collection.add( deserializer.apply( input ) );
             }
             c = input.nextClean();
             switch( c )
@@ -266,11 +266,11 @@ public class OrgJsonValueDeserializer
 
                     if( "key".equals( objectKey ) )
                     {
-                        key = keyDeserializer.map( input );
+                        key = keyDeserializer.apply( input );
                     }
                     else if( "value".equals( objectKey ) )
                     {
-                        value = valueDeserializer.map( input );
+                        value = valueDeserializer.apply( input );
                     }
                     else
                     {
@@ -394,7 +394,7 @@ public class OrgJsonValueDeserializer
         {
             return null;
         }
-        T value = valueDeserializer.map( valueNode );
+        T value = valueDeserializer.apply( valueNode );
         return value;
     }
 
@@ -414,7 +414,7 @@ public class OrgJsonValueDeserializer
         for( int idx = 0; idx < array.length(); idx++ )
         {
             Object item = array.get( idx );
-            T value = deserializer.map( item );
+            T value = deserializer.apply( item );
             collection.add( value );
         }
     }
@@ -442,8 +442,8 @@ public class OrgJsonValueDeserializer
             JSONObject object = (JSONObject) item;
             Object keyNode = object.get( "key" );
             Object valueNode = object.get( "value" );
-            K key = keyDeserializer.map( keyNode );
-            V value = valueDeserializer.map( valueNode );
+            K key = keyDeserializer.apply( keyNode );
+            V value = valueDeserializer.apply( valueNode );
             if( key != null )
             {
                 map.put( key, value );
@@ -471,7 +471,7 @@ public class OrgJsonValueDeserializer
         {
             String key = it.next();
             Object item = object.get( key );
-            V valueValue = valueDeserializer.map( item );
+            V valueValue = valueDeserializer.apply( item );
             if( key != null )
             {
                 map.put( key, valueValue );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/core/spi/src/main/java/org/apache/zest/valueserialization/orgjson/OrgJsonValueSerialization.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/apache/zest/valueserialization/orgjson/OrgJsonValueSerialization.java b/core/spi/src/main/java/org/apache/zest/valueserialization/orgjson/OrgJsonValueSerialization.java
index e9a5722..9ce1892 100644
--- a/core/spi/src/main/java/org/apache/zest/valueserialization/orgjson/OrgJsonValueSerialization.java
+++ b/core/spi/src/main/java/org/apache/zest/valueserialization/orgjson/OrgJsonValueSerialization.java
@@ -17,13 +17,13 @@ package org.apache.zest.valueserialization.orgjson;
 
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.util.function.BiFunction;
+import java.util.function.Function;
 import org.apache.zest.api.structure.Application;
 import org.apache.zest.api.structure.Module;
 import org.apache.zest.api.type.ValueType;
 import org.apache.zest.api.value.ValueSerialization;
 import org.apache.zest.api.value.ValueSerializationException;
-import org.apache.zest.functional.Function;
-import org.apache.zest.functional.Function2;
 
 /**
  * ValueSerialization producing and consuming JSON documents using org.json.
@@ -46,14 +46,7 @@ public class OrgJsonValueSerialization
     public OrgJsonValueSerialization( Application application, Module module, final Module valuesModule )
     {
         this.serializer = new OrgJsonValueSerializer();
-        this.deserializer = new OrgJsonValueDeserializer( application, module, new Function<Application, Module>()
-        {
-            @Override
-            public Module map( Application from )
-            {
-                return valuesModule;
-            }
-        } );
+        this.deserializer = new OrgJsonValueDeserializer( application, module, from -> valuesModule );
     }
 
     @Override
@@ -132,7 +125,7 @@ public class OrgJsonValueSerialization
     }
 
     @Override
-    public <T> Function2<ValueType, String, T> deserialize()
+    public <T> BiFunction<ValueType, String, T> deserialize()
     {
         return deserializer.deserialize();
     }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/core/spi/src/test/java/org/apache/zest/spi/entitystore/helpers/JSONManyAssociationStateTest.java
----------------------------------------------------------------------
diff --git a/core/spi/src/test/java/org/apache/zest/spi/entitystore/helpers/JSONManyAssociationStateTest.java b/core/spi/src/test/java/org/apache/zest/spi/entitystore/helpers/JSONManyAssociationStateTest.java
index 116a9ec..4d7dec3 100644
--- a/core/spi/src/test/java/org/apache/zest/spi/entitystore/helpers/JSONManyAssociationStateTest.java
+++ b/core/spi/src/test/java/org/apache/zest/spi/entitystore/helpers/JSONManyAssociationStateTest.java
@@ -16,12 +16,12 @@
 package org.apache.zest.spi.entitystore.helpers;
 
 import java.util.List;
+import java.util.function.Function;
 import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
 import org.junit.Test;
 import org.apache.zest.api.entity.EntityReference;
-import org.apache.zest.functional.Function;
 import org.apache.zest.spi.entity.EntityStatus;
 
 import static org.hamcrest.CoreMatchers.equalTo;
@@ -123,7 +123,7 @@ public class JSONManyAssociationStateTest
         List<String> refList = toList( map( new Function<EntityReference, String>()
         {
             @Override
-            public String map( EntityReference from )
+            public String apply( EntityReference from )
             {
                 return from.identity();
             }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/extensions/indexing-elasticsearch/src/main/java/org/apache/zest/index/elasticsearch/ElasticSearchFinder.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/apache/zest/index/elasticsearch/ElasticSearchFinder.java b/extensions/indexing-elasticsearch/src/main/java/org/apache/zest/index/elasticsearch/ElasticSearchFinder.java
index cb528c4..b1a6883 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/apache/zest/index/elasticsearch/ElasticSearchFinder.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/apache/zest/index/elasticsearch/ElasticSearchFinder.java
@@ -19,6 +19,7 @@ package org.apache.zest.index.elasticsearch;
 
 import java.util.HashMap;
 import java.util.Map;
+import java.util.function.Function;
 import org.elasticsearch.action.count.CountRequestBuilder;
 import org.elasticsearch.action.count.CountResponse;
 import org.elasticsearch.action.search.SearchRequestBuilder;
@@ -57,7 +58,6 @@ import org.apache.zest.api.query.grammar.PropertyNotNullSpecification;
 import org.apache.zest.api.query.grammar.PropertyNullSpecification;
 import org.apache.zest.api.query.grammar.QuerySpecification;
 import org.apache.zest.api.value.ValueComposite;
-import org.apache.zest.functional.Function;
 import org.apache.zest.functional.Iterables;
 import org.apache.zest.functional.Specification;
 import org.apache.zest.index.elasticsearch.ElasticSearchFinderSupport.ComplexTypeSupport;
@@ -136,7 +136,7 @@ public interface ElasticSearchFinder
             return Iterables.map( new Function<SearchHit, EntityReference>()
             {
                 @Override
-                public EntityReference map( SearchHit from )
+                public EntityReference apply( SearchHit from )
                 {
                     return EntityReference.parseEntityReference( from.id() );
                 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/AbstractSQLIndexing.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/AbstractSQLIndexing.java b/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/AbstractSQLIndexing.java
index df4835f..8d4f345 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/AbstractSQLIndexing.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/AbstractSQLIndexing.java
@@ -927,7 +927,7 @@ public abstract class AbstractSQLIndexing
         throws SQLException
     {
         ValueDescriptor vDesc = this._qi4SPI.valueDescriptorFor( (ValueComposite) property );
-        StateHolder state = ZestAPI.FUNCTION_COMPOSITE_INSTANCE_OF.map( (ValueComposite) property ).state();
+        StateHolder state = ZestAPI.FUNCTION_COMPOSITE_INSTANCE_OF.apply( (ValueComposite) property ).state();
         Integer originalPropertyPK = propertyPK;
         ++propertyPK;
         for( PropertyDescriptor pDesc : vDesc.state().properties() )

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/AbstractSQLQuerying.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/AbstractSQLQuerying.java b/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/AbstractSQLQuerying.java
index e1cf34e..add0581 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/AbstractSQLQuerying.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/AbstractSQLQuerying.java
@@ -178,11 +178,14 @@ public abstract class AbstractSQLQuerying
             return "[hasRefs="
                    + this._hasRefs
                    + ", ref:"
-                   + ( this._hasRefs
-                       ? ( this._traversedAsso == null ? this._traversedManyAsso : this._traversedAsso )
-                       : "null" )
+                   + ( this._hasRefs ? getTraversedAssociations() : "null" )
                    + "]";
         }
+
+        private Object getTraversedAssociations()
+        {
+            return this._traversedAsso == null ? this._traversedManyAsso : this._traversedAsso;
+        }
     }
 
     public static interface SQLBooleanCreator
@@ -1747,7 +1750,7 @@ public abstract class AbstractSQLQuerying
             // Visit all properties with recursion and make joins as necessary
             // @formatter:off
             for( Property<?> property
-                 : ZestAPI.FUNCTION_COMPOSITE_INSTANCE_OF.map( (ValueComposite) value ).state().properties() )
+                 : ZestAPI.FUNCTION_COMPOSITE_INSTANCE_OF.apply( (ValueComposite) value ).state().properties() )
             {
                 Boolean qNameJoinDone = false;
                 Integer sourceIndex = maxTableIndex.getInt();

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/AbstractSQLStartup.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/AbstractSQLStartup.java b/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/AbstractSQLStartup.java
index e7f98c1..f909290 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/AbstractSQLStartup.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/AbstractSQLStartup.java
@@ -37,6 +37,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.function.Function;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import javax.sql.DataSource;
@@ -58,7 +59,6 @@ import org.apache.zest.api.structure.ApplicationDescriptor;
 import org.apache.zest.api.structure.LayerDescriptor;
 import org.apache.zest.api.structure.ModuleDescriptor;
 import org.apache.zest.api.value.ValueDescriptor;
-import org.apache.zest.functional.Function;
 import org.apache.zest.functional.HierarchicalVisitorAdapter;
 import org.apache.zest.functional.Iterables;
 import org.apache.zest.functional.Specification;
@@ -1689,7 +1689,7 @@ public abstract class AbstractSQLStartup
                + Iterables.toString( descriptor.types(), new Function<Class<?>, String>()
         {
             @Override
-            public String map( Class<?> item )
+            public String apply( Class<?> item )
             {
                 return item.getName();
             }
@@ -1738,7 +1738,7 @@ public abstract class AbstractSQLStartup
                         new Function<Class<?>, String>()
                         {
                             @Override
-                            public String map( Class<?> from )
+                            public String apply( Class<?> from )
                             {
                                 return from.getName();
                             }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/SQLCompatEntityStateWrapper.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/SQLCompatEntityStateWrapper.java b/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/SQLCompatEntityStateWrapper.java
index b4d5b62..c3469ad 100644
--- a/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/SQLCompatEntityStateWrapper.java
+++ b/extensions/indexing-sql/src/main/java/org/apache/zest/index/sql/support/skeletons/SQLCompatEntityStateWrapper.java
@@ -17,6 +17,7 @@
  */
 package org.apache.zest.index.sql.support.skeletons;
 
+import java.util.function.Function;
 import org.apache.zest.api.association.AssociationDescriptor;
 import org.apache.zest.api.association.AssociationStateDescriptor;
 import org.apache.zest.api.common.QualifiedName;
@@ -27,7 +28,6 @@ import org.apache.zest.api.property.PropertyDescriptor;
 import org.apache.zest.api.type.CollectionType;
 import org.apache.zest.api.type.ValueCompositeType;
 import org.apache.zest.api.type.ValueType;
-import org.apache.zest.functional.Function;
 import org.apache.zest.functional.Iterables;
 import org.apache.zest.functional.Specification;
 import org.apache.zest.spi.entity.EntityState;
@@ -52,7 +52,7 @@ import org.slf4j.LoggerFactory;
     {
 
         @Override
-        public EntityState map( EntityState from )
+        public EntityState apply( EntityState from )
         {
             return new SQLCompatEntityStateWrapper( from );
         }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/extensions/valueserialization-jackson/src/main/java/org/apache/zest/valueserialization/jackson/JacksonValueDeserializer.java
----------------------------------------------------------------------
diff --git a/extensions/valueserialization-jackson/src/main/java/org/apache/zest/valueserialization/jackson/JacksonValueDeserializer.java b/extensions/valueserialization-jackson/src/main/java/org/apache/zest/valueserialization/jackson/JacksonValueDeserializer.java
index 7c3a9cb..1ff5cd8 100644
--- a/extensions/valueserialization-jackson/src/main/java/org/apache/zest/valueserialization/jackson/JacksonValueDeserializer.java
+++ b/extensions/valueserialization-jackson/src/main/java/org/apache/zest/valueserialization/jackson/JacksonValueDeserializer.java
@@ -26,6 +26,7 @@ import java.io.InputStream;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.function.Function;
 import org.apache.zest.api.injection.scope.Service;
 import org.apache.zest.api.injection.scope.Structure;
 import org.apache.zest.api.service.ServiceReference;
@@ -34,7 +35,6 @@ import org.apache.zest.api.structure.Module;
 import org.apache.zest.api.type.ValueType;
 import org.apache.zest.api.value.ValueDeserializer;
 import org.apache.zest.api.value.ValueSerializationException;
-import org.apache.zest.functional.Function;
 import org.apache.zest.spi.value.ValueDeserializerAdapter;
 
 /**
@@ -126,7 +126,7 @@ public class JacksonValueDeserializer
         }
         while( input.nextToken() != JsonToken.END_ARRAY )
         {
-            T element = deserializer.map( input );
+            T element = deserializer.apply( input );
             collection.add( element );
         }
         return collection;
@@ -174,11 +174,11 @@ public class JacksonValueDeserializer
                 input.nextToken();
                 if( "key".equals( objectKey ) )
                 {
-                    key = keyDeserializer.map( input );
+                    key = keyDeserializer.apply( input );
                 }
                 else if( "value".equals( objectKey ) )
                 {
-                    value = valueDeserializer.map( input );
+                    value = valueDeserializer.apply( input );
                 }
                 else
                 {
@@ -283,7 +283,7 @@ public class JacksonValueDeserializer
         {
             return null;
         }
-        T value = valueDeserializer.map( valueNode );
+        T value = valueDeserializer.apply( valueNode );
         return value;
     }
 
@@ -304,7 +304,7 @@ public class JacksonValueDeserializer
         ArrayNode array = (ArrayNode) inputNode;
         for( JsonNode item : array )
         {
-            T value = deserializer.map( item );
+            T value = deserializer.apply( item );
             collection.add( value );
         }
     }
@@ -333,8 +333,8 @@ public class JacksonValueDeserializer
             }
             JsonNode keyNode = item.get( "key" );
             JsonNode valueNode = item.get( "value" );
-            K key = keyDeserializer.map( keyNode );
-            V value = valueDeserializer.map( valueNode );
+            K key = keyDeserializer.apply( keyNode );
+            V value = valueDeserializer.apply( valueNode );
             if( key != null )
             {
                 map.put( key, value );
@@ -362,7 +362,7 @@ public class JacksonValueDeserializer
         while( fields.hasNext() )
         {
             Map.Entry<String, JsonNode> entry = fields.next();
-            V value = valueDeserializer.map( entry.getValue() );
+            V value = valueDeserializer.apply( entry.getValue() );
             map.put( entry.getKey(), value );
         }
     }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/extensions/valueserialization-jackson/src/main/java/org/apache/zest/valueserialization/jackson/JacksonValueSerializationAssembler.java
----------------------------------------------------------------------
diff --git a/extensions/valueserialization-jackson/src/main/java/org/apache/zest/valueserialization/jackson/JacksonValueSerializationAssembler.java b/extensions/valueserialization-jackson/src/main/java/org/apache/zest/valueserialization/jackson/JacksonValueSerializationAssembler.java
index 49812f8..d44ed1f 100644
--- a/extensions/valueserialization-jackson/src/main/java/org/apache/zest/valueserialization/jackson/JacksonValueSerializationAssembler.java
+++ b/extensions/valueserialization-jackson/src/main/java/org/apache/zest/valueserialization/jackson/JacksonValueSerializationAssembler.java
@@ -15,13 +15,13 @@
  */
 package org.apache.zest.valueserialization.jackson;
 
+import java.util.function.Function;
 import org.apache.zest.api.structure.Application;
 import org.apache.zest.api.structure.Module;
 import org.apache.zest.api.value.ValueSerialization;
 import org.apache.zest.bootstrap.Assemblers;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
-import org.apache.zest.functional.Function;
 
 /**
  * Assemble a ValueSerialization Service producing and consuming JSON documents.

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/extensions/valueserialization-orgjson/src/main/java/org/apache/zest/valueserialization/orgjson/OrgJsonValueSerializationAssembler.java
----------------------------------------------------------------------
diff --git a/extensions/valueserialization-orgjson/src/main/java/org/apache/zest/valueserialization/orgjson/OrgJsonValueSerializationAssembler.java b/extensions/valueserialization-orgjson/src/main/java/org/apache/zest/valueserialization/orgjson/OrgJsonValueSerializationAssembler.java
index 1b96e2b..f39b76c 100644
--- a/extensions/valueserialization-orgjson/src/main/java/org/apache/zest/valueserialization/orgjson/OrgJsonValueSerializationAssembler.java
+++ b/extensions/valueserialization-orgjson/src/main/java/org/apache/zest/valueserialization/orgjson/OrgJsonValueSerializationAssembler.java
@@ -15,13 +15,13 @@
  */
 package org.apache.zest.valueserialization.orgjson;
 
+import java.util.function.Function;
 import org.apache.zest.api.structure.Application;
 import org.apache.zest.api.structure.Module;
 import org.apache.zest.api.value.ValueSerialization;
 import org.apache.zest.bootstrap.Assemblers;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
-import org.apache.zest.functional.Function;
 
 /**
  * Assemble a ValueSerialization Service producing and consuming JSON documents.

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/extensions/valueserialization-stax/src/main/java/org/apache/zest/valueserialization/stax/StaxValueDeserializer.java
----------------------------------------------------------------------
diff --git a/extensions/valueserialization-stax/src/main/java/org/apache/zest/valueserialization/stax/StaxValueDeserializer.java b/extensions/valueserialization-stax/src/main/java/org/apache/zest/valueserialization/stax/StaxValueDeserializer.java
index f0f5eb5..3f86b64 100644
--- a/extensions/valueserialization-stax/src/main/java/org/apache/zest/valueserialization/stax/StaxValueDeserializer.java
+++ b/extensions/valueserialization-stax/src/main/java/org/apache/zest/valueserialization/stax/StaxValueDeserializer.java
@@ -25,6 +25,7 @@ import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.util.Collection;
 import java.util.Map;
+import java.util.function.Function;
 import javax.xml.stream.XMLEventReader;
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamException;
@@ -41,7 +42,6 @@ import org.apache.zest.api.structure.Application;
 import org.apache.zest.api.structure.Module;
 import org.apache.zest.api.value.ValueDeserializer;
 import org.apache.zest.api.value.ValueSerializationException;
-import org.apache.zest.functional.Function;
 import org.apache.zest.spi.value.ValueDeserializerAdapter;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -140,7 +140,7 @@ public class StaxValueDeserializer
             {
                 throw new ValueSerializationException( "Expected a <value/> but got: " + currentTag );
             }
-            T item = deserializer.map( input );
+            T item = deserializer.apply( input );
             collection.add( item );
         }
         return collection;
@@ -186,10 +186,10 @@ public class StaxValueDeserializer
                 switch( keyOrValue )
                 {
                     case "key":
-                        key = keyDeserializer.map( input );
+                        key = keyDeserializer.apply( input );
                         break;
                     case "value":
-                        value = valueDeserializer.map( input );
+                        value = valueDeserializer.apply( input );
                         break;
                     default:
                         readObjectTree( input );
@@ -368,7 +368,7 @@ public class StaxValueDeserializer
         {
             return null;
         }
-        T value = valueDeserializer.map( valueNode );
+        T value = valueDeserializer.apply( valueNode );
         return value;
     }
 
@@ -390,7 +390,7 @@ public class StaxValueDeserializer
         for( int arrayValuesIndex = 0; arrayValuesIndex < arrayValues.getLength(); arrayValuesIndex++ )
         {
             Node arrayValue = arrayValues.item( arrayValuesIndex );
-            T value = deserializer.map( arrayValue.getFirstChild() );
+            T value = deserializer.apply( arrayValue.getFirstChild() );
             collection.add( value );
         }
     }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/extensions/valueserialization-stax/src/main/java/org/apache/zest/valueserialization/stax/StaxValueSerializationAssembler.java
----------------------------------------------------------------------
diff --git a/extensions/valueserialization-stax/src/main/java/org/apache/zest/valueserialization/stax/StaxValueSerializationAssembler.java b/extensions/valueserialization-stax/src/main/java/org/apache/zest/valueserialization/stax/StaxValueSerializationAssembler.java
index 553737b..64ce44f 100644
--- a/extensions/valueserialization-stax/src/main/java/org/apache/zest/valueserialization/stax/StaxValueSerializationAssembler.java
+++ b/extensions/valueserialization-stax/src/main/java/org/apache/zest/valueserialization/stax/StaxValueSerializationAssembler.java
@@ -15,13 +15,13 @@
  */
 package org.apache.zest.valueserialization.stax;
 
+import java.util.function.Function;
 import org.apache.zest.api.structure.Application;
 import org.apache.zest.api.structure.Module;
 import org.apache.zest.api.value.ValueSerialization;
 import org.apache.zest.bootstrap.Assemblers;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
-import org.apache.zest.functional.Function;
 
 /**
  * Assemble a ValueSerialization Service producing and consuming XML documents.

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/conversion/src/main/java/org/apache/zest/library/conversion/values/EntityToValue.java
----------------------------------------------------------------------
diff --git a/libraries/conversion/src/main/java/org/apache/zest/library/conversion/values/EntityToValue.java b/libraries/conversion/src/main/java/org/apache/zest/library/conversion/values/EntityToValue.java
index db28b20..3824728 100644
--- a/libraries/conversion/src/main/java/org/apache/zest/library/conversion/values/EntityToValue.java
+++ b/libraries/conversion/src/main/java/org/apache/zest/library/conversion/values/EntityToValue.java
@@ -25,6 +25,7 @@ import java.util.Collections;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.function.Function;
 import org.apache.zest.api.association.Association;
 import org.apache.zest.api.association.AssociationDescriptor;
 import org.apache.zest.api.association.AssociationStateDescriptor;
@@ -42,7 +43,6 @@ import org.apache.zest.api.structure.Module;
 import org.apache.zest.api.value.NoSuchValueException;
 import org.apache.zest.api.value.ValueBuilder;
 import org.apache.zest.api.value.ValueDescriptor;
-import org.apache.zest.functional.Function;
 import org.apache.zest.functional.Iterables;
 import org.apache.zest.spi.ZestSPI;
 
@@ -118,7 +118,7 @@ public interface EntityToValue
         public <T> T convert( final Class<T> valueType, Object entity, Function<T, T> prototypeOpportunity )
         {
             ValueBuilder<?> builder = doConversion( valueType, entity );
-            prototypeOpportunity.map( (T) builder.prototype() );
+            prototypeOpportunity.apply( (T) builder.prototype() );
             return createInstance( builder );
         }
 
@@ -129,7 +129,7 @@ public interface EntityToValue
                 new Function<Object, T>()
                 {
                     @Override
-                    public T map( Object entity )
+                    public T apply( Object entity )
                     {
                         return convert( valueType, entity );
                     }
@@ -143,7 +143,7 @@ public interface EntityToValue
                 new Function<Object, T>()
                 {
                     @Override
-                    public T map( Object entity )
+                    public T apply( Object entity )
                     {
                         return convert( valueType, entity, prototypeOpportunity );
                     }
@@ -172,7 +172,7 @@ public interface EntityToValue
                     new Function<PropertyDescriptor, Object>()
                 {
                     @Override
-                    public Object map( PropertyDescriptor descriptor )
+                    public Object apply( PropertyDescriptor descriptor )
                     {
                         try
                         {
@@ -253,7 +253,7 @@ public interface EntityToValue
                     new Function<AssociationDescriptor, EntityReference>()
                     {
                         @Override
-                        public EntityReference map( AssociationDescriptor associationDescriptor )
+                        public EntityReference apply( AssociationDescriptor associationDescriptor )
                         {
                             return EntityReference.entityReferenceFor(
                                 associationState.associationFor( associationDescriptor.accessor() ).get() );
@@ -262,7 +262,7 @@ public interface EntityToValue
                     new Function<AssociationDescriptor, Iterable<EntityReference>>()
                     {
                         @Override
-                        public Iterable<EntityReference> map( AssociationDescriptor associationDescriptor )
+                        public Iterable<EntityReference> apply( AssociationDescriptor associationDescriptor )
                         {
                             ManyAssociation<?> state = associationState.manyAssociationFor( associationDescriptor.accessor() );
                             List<EntityReference> refs = new ArrayList<>( state.count() );
@@ -276,7 +276,7 @@ public interface EntityToValue
                     new Function<AssociationDescriptor, Map<String, EntityReference>>()
                     {
                         @Override
-                        public Map<String, EntityReference> map( AssociationDescriptor associationDescriptor )
+                        public Map<String, EntityReference> apply( AssociationDescriptor associationDescriptor )
                         {
                             NamedAssociation<?> assoc = associationState.namedAssociationFor( associationDescriptor.accessor() );
                             Map<String, EntityReference> refs = new LinkedHashMap<>( assoc.count() );
@@ -294,7 +294,7 @@ public interface EntityToValue
                     new Function<PropertyDescriptor, Object>()
                 {
                     @Override
-                    public Object map( final PropertyDescriptor descriptor )
+                    public Object apply( final PropertyDescriptor descriptor )
                     {
                         AssociationStateDescriptor entityState = entityDescriptor.state();
                         String propertyName = descriptor.qualifiedName().name();
@@ -378,7 +378,7 @@ public interface EntityToValue
                     new Function<AssociationDescriptor, EntityReference>()
                     {
                         @Override
-                        public EntityReference map( AssociationDescriptor descriptor )
+                        public EntityReference apply( AssociationDescriptor descriptor )
                         {
                             AssociationDescriptor associationDescriptor;
                             try
@@ -399,7 +399,7 @@ public interface EntityToValue
                     new Function<AssociationDescriptor, Iterable<EntityReference>>()
                     {
                         @Override
-                        public Iterable<EntityReference> map( final AssociationDescriptor descriptor )
+                        public Iterable<EntityReference> apply( final AssociationDescriptor descriptor )
                         {
                             AssociationDescriptor associationDescriptor;
                             try
@@ -425,7 +425,7 @@ public interface EntityToValue
                     new Function<AssociationDescriptor, Map<String, EntityReference>>()
                     {
                         @Override
-                        public Map<String, EntityReference> map( AssociationDescriptor descriptor )
+                        public Map<String, EntityReference> apply( AssociationDescriptor descriptor )
                         {
                             AssociationDescriptor associationDescriptor;
                             try

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/conversion/src/main/java/org/apache/zest/library/conversion/values/ValueToEntity.java
----------------------------------------------------------------------
diff --git a/libraries/conversion/src/main/java/org/apache/zest/library/conversion/values/ValueToEntity.java b/libraries/conversion/src/main/java/org/apache/zest/library/conversion/values/ValueToEntity.java
index b0b5e8e..8089a01 100644
--- a/libraries/conversion/src/main/java/org/apache/zest/library/conversion/values/ValueToEntity.java
+++ b/libraries/conversion/src/main/java/org/apache/zest/library/conversion/values/ValueToEntity.java
@@ -15,11 +15,11 @@
  */
 package org.apache.zest.library.conversion.values;
 
+import java.util.function.Function;
 import org.apache.zest.api.entity.EntityComposite;
 import org.apache.zest.api.entity.Identity;
 import org.apache.zest.api.unitofwork.NoSuchEntityException;
 import org.apache.zest.api.value.ValueComposite;
-import org.apache.zest.functional.Function;
 
 /**
  * Create or update Entities from matching Values.

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/conversion/src/main/java/org/apache/zest/library/conversion/values/ValueToEntityMixin.java
----------------------------------------------------------------------
diff --git a/libraries/conversion/src/main/java/org/apache/zest/library/conversion/values/ValueToEntityMixin.java b/libraries/conversion/src/main/java/org/apache/zest/library/conversion/values/ValueToEntityMixin.java
index b5dcdcb..cecb4e6 100644
--- a/libraries/conversion/src/main/java/org/apache/zest/library/conversion/values/ValueToEntityMixin.java
+++ b/libraries/conversion/src/main/java/org/apache/zest/library/conversion/values/ValueToEntityMixin.java
@@ -21,6 +21,7 @@ import java.util.Collections;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.function.Function;
 import org.apache.zest.api.association.Association;
 import org.apache.zest.api.association.AssociationDescriptor;
 import org.apache.zest.api.association.AssociationStateDescriptor;
@@ -39,7 +40,6 @@ import org.apache.zest.api.unitofwork.EntityTypeNotFoundException;
 import org.apache.zest.api.unitofwork.NoSuchEntityException;
 import org.apache.zest.api.value.ValueComposite;
 import org.apache.zest.api.value.ValueDescriptor;
-import org.apache.zest.functional.Function;
 import org.apache.zest.functional.Iterables;
 import org.apache.zest.spi.ZestSPI;
 import org.apache.zest.spi.module.ModelModule;
@@ -77,7 +77,7 @@ public class ValueToEntityMixin
         MANY_ASSOC_TO_ENTITY_REF_ITERABLE = new Function<ManyAssociation<?>, Iterable<EntityReference>>()
         {
             @Override
-            public Iterable<EntityReference> map( ManyAssociation<?> manyAssoc )
+            public Iterable<EntityReference> apply( ManyAssociation<?> manyAssoc )
             {
                 if( manyAssoc == null )
                 {
@@ -94,7 +94,7 @@ public class ValueToEntityMixin
         NAMED_ASSOC_TO_ENTITY_REF_MAP = new Function<NamedAssociation<?>, Map<String, EntityReference>>()
         {
             @Override
-            public Map<String, EntityReference> map( NamedAssociation<?> namedAssoc )
+            public Map<String, EntityReference> apply( NamedAssociation<?> namedAssoc )
             {
                 if( namedAssoc == null )
                 {
@@ -111,7 +111,7 @@ public class ValueToEntityMixin
         STRING_COLLEC_TO_ENTITY_REF_ITERABLE = new Function<Collection<String>, Iterable<EntityReference>>()
         {
             @Override
-            public Iterable<EntityReference> map( Collection<String> stringCollec )
+            public Iterable<EntityReference> apply( Collection<String> stringCollec )
             {
                 if( stringCollec == null )
                 {
@@ -128,7 +128,7 @@ public class ValueToEntityMixin
         STRING_MAP_TO_ENTITY_REF_MAP = new Function<Map<String, String>, Map<String, EntityReference>>()
         {
             @Override
-            public Map<String, EntityReference> map( Map<String, String> stringMap )
+            public Map<String, EntityReference> apply( Map<String, String> stringMap )
             {
                 if( stringMap == null )
                 {
@@ -166,7 +166,7 @@ public class ValueToEntityMixin
     public <T> T create( Class<T> entityType, Object value, Function<T, T> prototypeOpportunity )
     {
         EntityBuilder<?> builder = doConversion( entityType, null, value );
-        prototypeOpportunity.map( (T) builder.instance() );
+        prototypeOpportunity.apply( (T) builder.instance() );
         return createInstance( builder );
     }
 
@@ -174,7 +174,7 @@ public class ValueToEntityMixin
     public <T> T create( Class<T> entityType, String identity, Object value, Function<T, T> prototypeOpportunity )
     {
         EntityBuilder<?> builder = doConversion( entityType, identity, value );
-        prototypeOpportunity.map( (T) builder.instance() );
+        prototypeOpportunity.apply( (T) builder.instance() );
         return createInstance( builder );
     }
 
@@ -185,7 +185,7 @@ public class ValueToEntityMixin
             new Function<Object, T>()
             {
                 @Override
-                public T map( Object value )
+                public T apply( Object value )
                 {
                     return create( entityType, value );
                 }
@@ -204,7 +204,7 @@ public class ValueToEntityMixin
             new Function<Object, T>()
             {
                 @Override
-                public T map( Object value )
+                public T apply( Object value )
                 {
                     return create( entityType, value, prototypeOpportunity );
                 }
@@ -244,11 +244,10 @@ public class ValueToEntityMixin
         final AssociationStateHolder vState, final AssociationStateDescriptor vStateDesc
     )
     {
-        Function<PropertyDescriptor, Object> props
-            = new Function<PropertyDescriptor, Object>()
+        Function<PropertyDescriptor, Object> props = new Function<PropertyDescriptor, Object>()
         {
             @Override
-            public Object map( PropertyDescriptor ePropDesc )
+            public Object apply( PropertyDescriptor ePropDesc )
             {
                 try
                 {
@@ -265,7 +264,7 @@ public class ValueToEntityMixin
             = new Function<AssociationDescriptor, EntityReference>()
         {
             @Override
-            public EntityReference map( AssociationDescriptor eAssocDesc )
+            public EntityReference apply( AssociationDescriptor eAssocDesc )
             {
                 try
                 {
@@ -296,12 +295,12 @@ public class ValueToEntityMixin
             = new Function<AssociationDescriptor, Iterable<EntityReference>>()
         {
             @Override
-            public Iterable<EntityReference> map( AssociationDescriptor eAssocDesc )
+            public Iterable<EntityReference> apply( AssociationDescriptor eAssocDesc )
             {
                 try
                 {
                     ManyAssociation<Object> vAssocState = vState.manyAssociationFor( eAssocDesc.accessor() );
-                    return MANY_ASSOC_TO_ENTITY_REF_ITERABLE.map( vAssocState );
+                    return MANY_ASSOC_TO_ENTITY_REF_ITERABLE.apply( vAssocState );
                 }
                 catch( IllegalArgumentException assocNotFoundOnValue )
                 {
@@ -314,7 +313,7 @@ public class ValueToEntityMixin
                         {
                             Collection<String> vAssocState = (Collection) vState
                                 .propertyFor( vPropDesc.accessor() ).get();
-                            return STRING_COLLEC_TO_ENTITY_REF_ITERABLE.map( vAssocState );
+                            return STRING_COLLEC_TO_ENTITY_REF_ITERABLE.apply( vAssocState );
                         }
                         return Iterables.empty();
                     }
@@ -329,12 +328,12 @@ public class ValueToEntityMixin
             = new Function<AssociationDescriptor, Map<String, EntityReference>>()
         {
             @Override
-            public Map<String, EntityReference> map( AssociationDescriptor eAssocDesc )
+            public Map<String, EntityReference> apply( AssociationDescriptor eAssocDesc )
             {
                 try
                 {
                     NamedAssociation<?> vAssocState = vState.namedAssociationFor( eAssocDesc.accessor() );
-                    return NAMED_ASSOC_TO_ENTITY_REF_MAP.map( vAssocState );
+                    return NAMED_ASSOC_TO_ENTITY_REF_MAP.apply( vAssocState );
                 }
                 catch( IllegalArgumentException assocNotFoundOnValue )
                 {
@@ -347,7 +346,7 @@ public class ValueToEntityMixin
                         {
                             Map<String, String> vAssocState = (Map) vState
                                 .propertyFor( vPropDesc.accessor() ).get();
-                            return STRING_MAP_TO_ENTITY_REF_MAP.map( vAssocState );
+                            return STRING_MAP_TO_ENTITY_REF_MAP.apply( vAssocState );
                         }
                         return Collections.EMPTY_MAP;
                     }
@@ -372,7 +371,7 @@ public class ValueToEntityMixin
             = new Function<PropertyDescriptor, Object>()
         {
             @Override
-            public Object map( PropertyDescriptor ePropDesc )
+            public Object apply( PropertyDescriptor ePropDesc )
             {
                 String propName = ePropDesc.qualifiedName().name();
                 try
@@ -391,7 +390,7 @@ public class ValueToEntityMixin
             = new Function<AssociationDescriptor, EntityReference>()
         {
             @Override
-            public EntityReference map( AssociationDescriptor eAssocDesc )
+            public EntityReference apply( AssociationDescriptor eAssocDesc )
             {
                 String assocName = eAssocDesc.qualifiedName().name();
                 try
@@ -424,14 +423,14 @@ public class ValueToEntityMixin
             = new Function<AssociationDescriptor, Iterable<EntityReference>>()
         {
             @Override
-            public Iterable<EntityReference> map( AssociationDescriptor eAssocDesc )
+            public Iterable<EntityReference> apply( AssociationDescriptor eAssocDesc )
             {
                 String assocName = eAssocDesc.qualifiedName().name();
                 try
                 {
                     AssociationDescriptor vAssocDesc = vStateDesc.getManyAssociationByName( assocName );
                     ManyAssociation<Object> vManyAssoc = vState.manyAssociationFor( vAssocDesc.accessor() );
-                    return MANY_ASSOC_TO_ENTITY_REF_ITERABLE.map( vManyAssoc );
+                    return MANY_ASSOC_TO_ENTITY_REF_ITERABLE.apply( vManyAssoc );
                 }
                 catch( IllegalArgumentException assocNotFoundOnValue )
                 {
@@ -443,7 +442,7 @@ public class ValueToEntityMixin
                         {
                             Collection<String> vAssocState = (Collection) vState
                                 .propertyFor( vPropDesc.accessor() ).get();
-                            return STRING_COLLEC_TO_ENTITY_REF_ITERABLE.map( vAssocState );
+                            return STRING_COLLEC_TO_ENTITY_REF_ITERABLE.apply( vAssocState );
                         }
                         return Iterables.empty();
                     }
@@ -458,14 +457,14 @@ public class ValueToEntityMixin
             = new Function<AssociationDescriptor, Map<String, EntityReference>>()
         {
             @Override
-            public Map<String, EntityReference> map( AssociationDescriptor eAssocDesc )
+            public Map<String, EntityReference> apply( AssociationDescriptor eAssocDesc )
             {
                 String assocName = eAssocDesc.qualifiedName().name();
                 try
                 {
                     AssociationDescriptor vAssocDesc = vStateDesc.getNamedAssociationByName( assocName );
                     NamedAssociation<Object> vAssocState = vState.namedAssociationFor( vAssocDesc.accessor() );
-                    return NAMED_ASSOC_TO_ENTITY_REF_MAP.map( vAssocState );
+                    return NAMED_ASSOC_TO_ENTITY_REF_MAP.apply( vAssocState );
                 }
                 catch( IllegalArgumentException assocNotFoundOnValue )
                 {
@@ -477,7 +476,7 @@ public class ValueToEntityMixin
                         {
                             Map<String, String> vAssocState = (Map) vState
                                 .propertyFor( vPropDesc.accessor() ).get();
-                            return STRING_MAP_TO_ENTITY_REF_MAP.map( vAssocState );
+                            return STRING_MAP_TO_ENTITY_REF_MAP.apply( vAssocState );
                         }
                         return Collections.EMPTY_MAP;
                     }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/conversion/src/test/java/org/apache/zest/library/conversion/values/EntityToValueTest.java
----------------------------------------------------------------------
diff --git a/libraries/conversion/src/test/java/org/apache/zest/library/conversion/values/EntityToValueTest.java b/libraries/conversion/src/test/java/org/apache/zest/library/conversion/values/EntityToValueTest.java
index 59caf83..ef06960 100644
--- a/libraries/conversion/src/test/java/org/apache/zest/library/conversion/values/EntityToValueTest.java
+++ b/libraries/conversion/src/test/java/org/apache/zest/library/conversion/values/EntityToValueTest.java
@@ -20,6 +20,7 @@
 package org.apache.zest.library.conversion.values;
 
 import java.util.Date;
+import java.util.function.Function;
 import org.junit.Test;
 import org.apache.zest.api.constraint.ConstraintViolationException;
 import org.apache.zest.api.service.ServiceReference;
@@ -27,7 +28,6 @@ import org.apache.zest.api.unitofwork.UnitOfWork;
 import org.apache.zest.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
-import org.apache.zest.functional.Function;
 import org.apache.zest.library.conversion.values.TestModel.PersonEntity;
 import org.apache.zest.library.conversion.values.TestModel.PersonValue;
 import org.apache.zest.library.conversion.values.TestModel.PersonValue2;
@@ -168,7 +168,7 @@ public class EntityToValueTest
             PersonValue value = conversion.convert( PersonValue.class, entity, new Function<PersonValue, PersonValue>()
             {
                 @Override
-                public PersonValue map( PersonValue prototype )
+                public PersonValue apply( PersonValue prototype )
                 {
                     prototype.firstName().set( "Prototype Opportunity" );
                     return prototype;

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/eventsourcing-jdbm/src/main/java/org/apache/zest/library/eventsourcing/domain/source/jdbm/JdbmEventStoreService.java
----------------------------------------------------------------------
diff --git a/libraries/eventsourcing-jdbm/src/main/java/org/apache/zest/library/eventsourcing/domain/source/jdbm/JdbmEventStoreService.java b/libraries/eventsourcing-jdbm/src/main/java/org/apache/zest/library/eventsourcing/domain/source/jdbm/JdbmEventStoreService.java
index 3a0878e..0a13db2 100644
--- a/libraries/eventsourcing-jdbm/src/main/java/org/apache/zest/library/eventsourcing/domain/source/jdbm/JdbmEventStoreService.java
+++ b/libraries/eventsourcing-jdbm/src/main/java/org/apache/zest/library/eventsourcing/domain/source/jdbm/JdbmEventStoreService.java
@@ -21,6 +21,7 @@ import java.io.File;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.util.Properties;
+import java.util.function.Function;
 import jdbm.RecordManager;
 import jdbm.RecordManagerFactory;
 import jdbm.RecordManagerOptions;
@@ -37,7 +38,6 @@ import org.apache.zest.api.mixin.Mixins;
 import org.apache.zest.api.service.ServiceComposite;
 import org.apache.zest.api.service.qualifier.Tagged;
 import org.apache.zest.api.value.ValueSerialization;
-import org.apache.zest.functional.Function;
 import org.apache.zest.io.Input;
 import org.apache.zest.io.Output;
 import org.apache.zest.io.Receiver;
@@ -123,7 +123,7 @@ public interface JdbmEventStoreService
             }, Transforms.map( new Function<String, UnitOfWorkDomainEventsValue>()
             {
                 @Override
-                public UnitOfWorkDomainEventsValue map( String item )
+                public UnitOfWorkDomainEventsValue apply( String item )
                 {
                     return valueSerialization.<UnitOfWorkDomainEventsValue>deserialize( eventsType, item );
                 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/eventsourcing-jdbm/src/test/java/org/apache/zest/library/eventsourcing/domain/source/jdbm/JdbmEventStoreServiceTest.java
----------------------------------------------------------------------
diff --git a/libraries/eventsourcing-jdbm/src/test/java/org/apache/zest/library/eventsourcing/domain/source/jdbm/JdbmEventStoreServiceTest.java b/libraries/eventsourcing-jdbm/src/test/java/org/apache/zest/library/eventsourcing/domain/source/jdbm/JdbmEventStoreServiceTest.java
index d8d4271..858f29c 100644
--- a/libraries/eventsourcing-jdbm/src/test/java/org/apache/zest/library/eventsourcing/domain/source/jdbm/JdbmEventStoreServiceTest.java
+++ b/libraries/eventsourcing-jdbm/src/test/java/org/apache/zest/library/eventsourcing/domain/source/jdbm/JdbmEventStoreServiceTest.java
@@ -16,6 +16,7 @@ package org.apache.zest.library.eventsourcing.domain.source.jdbm;
 
 import java.io.IOException;
 import java.security.Principal;
+import java.util.function.Function;
 import org.junit.Test;
 import org.apache.zest.api.common.UseDefaults;
 import org.apache.zest.api.entity.EntityComposite;
@@ -27,7 +28,6 @@ import org.apache.zest.api.usecase.UsecaseBuilder;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ImportedServiceDeclaration;
 import org.apache.zest.bootstrap.ModuleAssembly;
-import org.apache.zest.functional.Function;
 import org.apache.zest.io.Outputs;
 import org.apache.zest.io.Transforms;
 import org.apache.zest.library.eventsourcing.domain.api.DomainEvent;
@@ -91,7 +91,7 @@ public class JdbmEventStoreServiceTest
 
             source.events( 0, Long.MAX_VALUE ).transferTo( Transforms.map( new Function<UnitOfWorkDomainEventsValue, String>()
                     {
-                        public String map( UnitOfWorkDomainEventsValue unitOfWorkDomainEventsValue )
+                        public String apply( UnitOfWorkDomainEventsValue unitOfWorkDomainEventsValue )
                         {
                             return unitOfWorkDomainEventsValue.toString();
                         }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/eventsourcing/src/main/java/org/apache/zest/library/eventsourcing/application/source/helper/ApplicationEvents.java
----------------------------------------------------------------------
diff --git a/libraries/eventsourcing/src/main/java/org/apache/zest/library/eventsourcing/application/source/helper/ApplicationEvents.java b/libraries/eventsourcing/src/main/java/org/apache/zest/library/eventsourcing/application/source/helper/ApplicationEvents.java
index 858941a..fcc6117 100644
--- a/libraries/eventsourcing/src/main/java/org/apache/zest/library/eventsourcing/application/source/helper/ApplicationEvents.java
+++ b/libraries/eventsourcing/src/main/java/org/apache/zest/library/eventsourcing/application/source/helper/ApplicationEvents.java
@@ -20,8 +20,8 @@ import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.function.Function;
 import org.apache.zest.api.util.Methods;
-import org.apache.zest.functional.Function;
 import org.apache.zest.functional.Iterables;
 import org.apache.zest.functional.Specification;
 import org.apache.zest.io.Output;
@@ -107,11 +107,11 @@ public class ApplicationEvents
         return ApplicationEvents.withNames( Iterables.map( new Function<Method, String>()
         {
             @Override
-            public String map( Method method )
+            public String apply( Method method )
             {
                 return method.getName();
             }
-        }, Iterables.toList( Methods.METHODS_OF.map( eventClass ) ) ));
+        }, Iterables.toList( Methods.METHODS_OF.apply( eventClass ) ) ));
     }
 
     public static Specification<ApplicationEvent> afterDate( final Date afterDate )

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/eventsourcing/src/main/java/org/apache/zest/library/eventsourcing/domain/factory/DomainEventFactoryService.java
----------------------------------------------------------------------
diff --git a/libraries/eventsourcing/src/main/java/org/apache/zest/library/eventsourcing/domain/factory/DomainEventFactoryService.java b/libraries/eventsourcing/src/main/java/org/apache/zest/library/eventsourcing/domain/factory/DomainEventFactoryService.java
index 338ae29..46c7118 100644
--- a/libraries/eventsourcing/src/main/java/org/apache/zest/library/eventsourcing/domain/factory/DomainEventFactoryService.java
+++ b/libraries/eventsourcing/src/main/java/org/apache/zest/library/eventsourcing/domain/factory/DomainEventFactoryService.java
@@ -54,7 +54,7 @@ public interface DomainEventFactoryService
 
             DomainEventValue prototype = builder.prototype();
             prototype.name().set( name );
-            prototype.entityType().set( first( ZestAPI.FUNCTION_DESCRIPTOR_FOR.map( entity ).types()).getName() );
+            prototype.entityType().set( first( ZestAPI.FUNCTION_DESCRIPTOR_FOR.apply( entity ).types()).getName() );
             prototype.entityId().set( entity.identity().get() );
 
             // JSON-ify parameters

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/eventsourcing/src/main/java/org/apache/zest/library/eventsourcing/domain/source/helper/Events.java
----------------------------------------------------------------------
diff --git a/libraries/eventsourcing/src/main/java/org/apache/zest/library/eventsourcing/domain/source/helper/Events.java b/libraries/eventsourcing/src/main/java/org/apache/zest/library/eventsourcing/domain/source/helper/Events.java
index d3fed74..ff2a466 100644
--- a/libraries/eventsourcing/src/main/java/org/apache/zest/library/eventsourcing/domain/source/helper/Events.java
+++ b/libraries/eventsourcing/src/main/java/org/apache/zest/library/eventsourcing/domain/source/helper/Events.java
@@ -18,8 +18,8 @@ package org.apache.zest.library.eventsourcing.domain.source.helper;
 
 import java.lang.reflect.Method;
 import java.util.Date;
+import java.util.function.Function;
 import org.apache.zest.api.util.Methods;
-import org.apache.zest.functional.Function;
 import org.apache.zest.functional.Iterables;
 import org.apache.zest.functional.Specification;
 import org.apache.zest.library.eventsourcing.domain.api.DomainEventValue;
@@ -37,7 +37,7 @@ public class Events
         return Iterables.flattenIterables( Iterables.map( new Function<UnitOfWorkDomainEventsValue, Iterable<DomainEventValue>>()
         {
             @Override
-            public Iterable<DomainEventValue> map( UnitOfWorkDomainEventsValue unitOfWorkDomainEventsValue )
+            public Iterable<DomainEventValue> apply( UnitOfWorkDomainEventsValue unitOfWorkDomainEventsValue )
             {
                 return unitOfWorkDomainEventsValue.events().get();
             }
@@ -147,11 +147,11 @@ public class Events
         return Events.withNames( map( new Function<Method, String>()
         {
             @Override
-            public String map( Method method )
+            public String apply( Method method )
             {
                 return method.getName();
             }
-        }, Iterables.toList( Methods.METHODS_OF.map( eventClass ) ) ));
+        }, Iterables.toList( Methods.METHODS_OF.apply( eventClass ) ) ));
     }
 
     public static Specification<DomainEventValue> onEntities( final String... entities )

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/domain/DomainEventTest.java
----------------------------------------------------------------------
diff --git a/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/domain/DomainEventTest.java b/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/domain/DomainEventTest.java
index ffa4a5c..dcd5bee 100644
--- a/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/domain/DomainEventTest.java
+++ b/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/domain/DomainEventTest.java
@@ -14,6 +14,7 @@
 
 package org.apache.zest.library.eventsourcing.domain;
 
+import java.util.function.Function;
 import org.junit.Test;
 import org.apache.zest.api.common.UseDefaults;
 import org.apache.zest.api.entity.EntityComposite;
@@ -24,7 +25,6 @@ import org.apache.zest.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.zest.api.usecase.UsecaseBuilder;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
-import org.apache.zest.functional.Function;
 import org.apache.zest.io.Outputs;
 import org.apache.zest.io.Transforms;
 import org.apache.zest.library.eventsourcing.bootstrap.EventsourcingAssembler;
@@ -90,7 +90,7 @@ public class DomainEventTest
 
         source.events( 0, Long.MAX_VALUE ).transferTo( Transforms.map( new Function<UnitOfWorkDomainEventsValue, String>()
                 {
-                    public String map( UnitOfWorkDomainEventsValue unitOfWorkDomainEventsValue )
+                    public String apply( UnitOfWorkDomainEventsValue unitOfWorkDomainEventsValue )
                     {
                         return unitOfWorkDomainEventsValue.toString();
                     }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/domain/source/helper/DomainEventTrackerTest.java
----------------------------------------------------------------------
diff --git a/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/domain/source/helper/DomainEventTrackerTest.java b/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/domain/source/helper/DomainEventTrackerTest.java
index 3a036a1..9f357f5 100644
--- a/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/domain/source/helper/DomainEventTrackerTest.java
+++ b/libraries/eventsourcing/src/test/java/org/apache/zest/library/eventsourcing/domain/source/helper/DomainEventTrackerTest.java
@@ -16,6 +16,7 @@ package org.apache.zest.library.eventsourcing.domain.source.helper;
 
 import java.io.IOException;
 import java.security.Principal;
+import java.util.function.Function;
 import org.junit.Test;
 import org.apache.zest.api.activation.ActivatorAdapter;
 import org.apache.zest.api.activation.Activators;
@@ -34,7 +35,6 @@ import org.apache.zest.api.usecase.UsecaseBuilder;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ImportedServiceDeclaration;
 import org.apache.zest.bootstrap.ModuleAssembly;
-import org.apache.zest.functional.Function;
 import org.apache.zest.io.Output;
 import org.apache.zest.io.Outputs;
 import org.apache.zest.io.Transforms;
@@ -163,7 +163,7 @@ public class DomainEventTrackerTest
 
                Output<UnitOfWorkDomainEventsValue,RuntimeException> map = Transforms.map( new Function<UnitOfWorkDomainEventsValue, String>()
                        {
-                           public String map( UnitOfWorkDomainEventsValue unitOfWorkDomainEventsValue )
+                           public String apply( UnitOfWorkDomainEventsValue unitOfWorkDomainEventsValue )
                            {
                                return unitOfWorkDomainEventsValue.toString();
                            }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/jmx/src/main/java/org/apache/zest/library/jmx/ConfigurationManagerService.java
----------------------------------------------------------------------
diff --git a/libraries/jmx/src/main/java/org/apache/zest/library/jmx/ConfigurationManagerService.java b/libraries/jmx/src/main/java/org/apache/zest/library/jmx/ConfigurationManagerService.java
index 6c9809d..655fc31 100644
--- a/libraries/jmx/src/main/java/org/apache/zest/library/jmx/ConfigurationManagerService.java
+++ b/libraries/jmx/src/main/java/org/apache/zest/library/jmx/ConfigurationManagerService.java
@@ -138,7 +138,7 @@ public interface ConfigurationManagerService
                 }
 
                 // Check if service has configuration
-                CompositeInstance compositeInstance = ZestAPI.FUNCTION_COMPOSITE_INSTANCE_OF.map( (Composite) service );
+                CompositeInstance compositeInstance = ZestAPI.FUNCTION_COMPOSITE_INSTANCE_OF.apply( (Composite) service );
                 try
                 {
                     Configuration config = compositeInstance.newProxy( Configuration.class );
@@ -406,7 +406,7 @@ public interface ConfigurationManagerService
                         {
                             // Refresh configuration
                             CompositeInstance compositeInstance = ZestAPI.FUNCTION_COMPOSITE_INSTANCE_OF
-                                .map( (Composite) serviceRef.get() );
+                                .apply( (Composite) serviceRef.get() );
                             compositeInstance.newProxy( Configuration.class ).refresh();
 
                             ( (Activation) serviceRef ).passivate();

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/lang-scala/src/main/java/org/apache/zest/library/scala/ScalaTraitMixin.java
----------------------------------------------------------------------
diff --git a/libraries/lang-scala/src/main/java/org/apache/zest/library/scala/ScalaTraitMixin.java b/libraries/lang-scala/src/main/java/org/apache/zest/library/scala/ScalaTraitMixin.java
index da00c58..be54628 100644
--- a/libraries/lang-scala/src/main/java/org/apache/zest/library/scala/ScalaTraitMixin.java
+++ b/libraries/lang-scala/src/main/java/org/apache/zest/library/scala/ScalaTraitMixin.java
@@ -24,6 +24,7 @@ import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.function.Function;
 import org.apache.zest.api.ZestAPI;
 import org.apache.zest.api.common.AppliesTo;
 import org.apache.zest.api.common.AppliesToFilter;
@@ -33,7 +34,6 @@ import org.apache.zest.api.injection.scope.Service;
 import org.apache.zest.api.injection.scope.This;
 import org.apache.zest.api.service.ServiceReference;
 import org.apache.zest.api.util.Classes;
-import org.apache.zest.functional.Function;
 import org.apache.zest.functional.Iterables;
 
 import static org.apache.zest.api.util.Classes.interfacesOf;
@@ -51,7 +51,7 @@ public class ScalaTraitMixin
 
     public ScalaTraitMixin( @This Composite composite )
     {
-        compositeType = ZestAPI.FUNCTION_DESCRIPTOR_FOR.map( composite ).primaryType();
+        compositeType = ZestAPI.FUNCTION_DESCRIPTOR_FOR.apply( composite ).primaryType();
     }
 
     @Override
@@ -108,7 +108,7 @@ public class ScalaTraitMixin
                     Class current;
 
                     @Override
-                    public Class map( Class aClass )
+                    public Class apply( Class aClass )
                     {
                         if( declaringClass.isAssignableFrom( aClass ) )
                         {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/5989a71e/libraries/logging/src/main/java/org/apache/zest/library/logging/debug/service/DebugOnConsoleSideEffect.java
----------------------------------------------------------------------
diff --git a/libraries/logging/src/main/java/org/apache/zest/library/logging/debug/service/DebugOnConsoleSideEffect.java b/libraries/logging/src/main/java/org/apache/zest/library/logging/debug/service/DebugOnConsoleSideEffect.java
index 66c7ae2..4001486 100644
--- a/libraries/logging/src/main/java/org/apache/zest/library/logging/debug/service/DebugOnConsoleSideEffect.java
+++ b/libraries/logging/src/main/java/org/apache/zest/library/logging/debug/service/DebugOnConsoleSideEffect.java
@@ -62,7 +62,7 @@ public class DebugOnConsoleSideEffect extends SideEffectOf<LoggingService>
 
     private String getCompositeName( Composite composite )
     {
-        return first( ZestAPI.FUNCTION_DESCRIPTOR_FOR.map( composite ).types()).getName();
+        return first( ZestAPI.FUNCTION_DESCRIPTOR_FOR.apply( composite ).types()).getName();
     }
 
     @Override


Mime
View raw message