Package jfun.yan.util

Examples of jfun.yan.util.Predicate


    verifyLinkedHashMap((LinkedHashMap)hmap);
    final Component bad_hash = Components.hashmap(
        new String[]{"a","b"},
        new Creator[]{
            Components.useKey("a").withState("hello"),
            Components.useState(new Predicate(){
              public boolean isObject(Object obj){
                return false;
              }
            })
        }
View Full Code Here


    assertEquals("cde", strs.get(2));
   
  }
  public void testUseState(){
    final Container yan = createYanContainer();
    yan.registerComponent("allnul", Components.useState(new Predicate(){
      public boolean isObject(Object obj){
        return obj==null;
      }
      public String toString(){return "isnull";}
    }).withState("!do not recurse on me"));
    yan.registerComponent("startswithhello", Components.useState(new Predicate(){
      public boolean isObject(Object obj){
        if(obj instanceof String){
          final String s = (String)obj;
          return s.startsWith("hello");
        }
View Full Code Here

TOP

Related Classes of jfun.yan.util.Predicate

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.