Package jfun.yan

Examples of jfun.yan.Map2


   */
  public abstract void assertion(Object v1, Object v2);
  public Component eval(){
    if(!isVal1Set() || !isVal2Set())
      throw raise("both values should be set for comparison.");
    final Map2 cmp = new Map2(){
      public Object map(Object o1, Object o2){
        assertion(o1, o2);
        return Components.value(null);
      }
    };
View Full Code Here


    .incomplete();
    final Component keys = Components.value(new String[]{"first", "second", "third"});
    final Component vals = Components.list(new Creator[]{newAvenue.withArgument(0, Components.value("Randolph")),
        newAvenue.withArgument(0, Components.value("Lincoln")),
        newAvenue.withArgument(0, Components.value("Fullerton"))});
    final Component cc = Monad.map(keys, vals, new Map2(){
      public Object map(Object o1, Object o2){
        final Object[] ks = (Object[])o1;
        final java.util.List vs = (java.util.List)o2;
        final LinkedHashMap lhm = new LinkedHashMap(ks.length);
        for(int i=0;i<vs.size();i++){
View Full Code Here

   */
  public static Component getProxyComponentReturningInjected(
      final ClassLoader cloader, final Class itf,
      Component proxied, final Class injectee_type, Binder binder){
    final Component mutation = getInjectorComponent(Mutation.class, binder);
    final Component injected = Monad.map(proxied, mutation, new Map2(){
      public Object map(Object proxied, Object mut){
        return InjectingProxy.getInjectingProxy(cloader, itf,
            proxied, injectee_type, (Mutation)mut);
      }
    });
View Full Code Here

TOP

Related Classes of jfun.yan.Map2

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.